django_prodserver.backends.servers package

Submodules

django_prodserver.backends.servers.flower module

class django_prodserver.backends.servers.flower.CeleryFlower(**server_config: Any)[source]

Bases: BaseServerBackend

Backend to start a Celery Flower monitoring server.

start_server(*args: str) None[source]

Start Celery Flower via the flower subcommand on the Celery app.

django_prodserver.backends.servers.granian module

Granian server backends for ASGI and WSGI applications.

class django_prodserver.backends.servers.granian.GranianASGIServer(**server_args: Any)[source]

Bases: GranianServerBase

Granian ASGI Server Backend.

This backend uses Granian’s ASGI interface to serve Django ASGI applications. Granian is a Rust-based HTTP server with excellent performance characteristics.

Example configuration:
{

“BACKEND”: “django_prodserver.backends.servers.granian.GranianASGIServer”, “ARGS”: {

“address”: “0.0.0.0”, “port”: “8000”, “workers”: “4”, “blocking_threads”: “1”,

}

}

class django_prodserver.backends.servers.granian.GranianServerBase(**server_args: Any)[source]

Bases: BaseServerBackend

Base class for Granian server backends.

Provides common functionality for both ASGI and WSGI Granian servers, including argument parsing and server configuration.

start_server(*args: str) None[source]

Start the Granian server.

class django_prodserver.backends.servers.granian.GranianWSGIServer(**server_args: Any)[source]

Bases: GranianServerBase

Granian WSGI Server Backend.

This backend uses Granian’s WSGI interface to serve Django WSGI applications. Granian is a Rust-based HTTP server with excellent performance characteristics.

Example configuration:
{

“BACKEND”: “django_prodserver.backends.servers.granian.GranianWSGIServer”, “ARGS”: {

“address”: “0.0.0.0”, “port”: “8000”, “workers”: “4”, “blocking_threads”: “2”,

}

}

django_prodserver.backends.servers.gunicorn module

django_prodserver.backends.servers.uvicorn module

class django_prodserver.backends.servers.uvicorn.UvicornServer(**server_args: Any)[source]

Bases: BaseServerBackend

Uvicorn ASGIServer Backend.

This bypasses any Django handling of the command and sends all arguments straight to uvicorn.

prep_server_args() list[str][source]

Prepare the server args.

start_server(*args: str) None[source]

Start the server.

class django_prodserver.backends.servers.uvicorn.UvicornWSGIServer(**server_args: Any)[source]

Bases: BaseServerBackend

Uvicorn WSGIServer Backend.

This bypasses any Django handling of the command and sends all arguments straight to uvicorn.

prep_server_args() list[str][source]

Prepare the server args.

start_server(*args: str) None[source]

Start the server.

django_prodserver.backends.servers.waitress module