Skip to main content

A mangement command to provide a manage.py interface to production wsgi/asgi servers

Project description

django-prodserver

PyPI Status Python Version License

Read the documentation at https://django-prodserver.readthedocs.io/ Tests Codecov

pre-commit Black

Features

This package features 2 new management commands

  • manage.py devserver - this is a simple rename of runserver
  • manage.py prodserver - this will start your wsgi/asgi server

Includes in this package are configurations for gunicorn, waitress and uvicorn (wgsi & asgi)

Requirements

  • django-click
  • your wsgi/asgi server of choice

Installation

You can install django-prodserver via pip from PyPI:

$ pip install django_prodserver

Add the following settings:

INSTALLED_APPS += ["django_prodserver"]

PROD_SERVERS = {
    'web': {
        "BACKEND": "django_prodserver.backends.gunicorn.GunicornServer",
        "ARGS": [
            "--bind=0.0.0.0:8111"
            # other gunicorn commmand line args go here
        ]
    }
}

Then you will be able to use the management command like so:

$ python manage.py prodserver web

Usage

Please see the Command-line Reference for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, django-prodserver is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @OmenApps's Cookiecutter Django Package template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_prodserver-2024.3.2.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

django_prodserver-2024.3.2-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page