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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file django_prodserver-2024.3.2.tar.gz.

File metadata

  • Download URL: django_prodserver-2024.3.2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for django_prodserver-2024.3.2.tar.gz
Algorithm Hash digest
SHA256 d4a64cfdfb90322a1ade8fe24f3dde35b3329cd9ab9684b67283f2bb89d64d5d
MD5 dcbb7f1443f7c830779983210bdfd8af
BLAKE2b-256 8dc010916533d4d3bf7921f6ba409f2d8ef80378ee159706b6bafd5f1092acc1

See more details on using hashes here.

File details

Details for the file django_prodserver-2024.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_prodserver-2024.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6171b62efa738d85d19a9e6cc7fb27bf7f227cbb0b53bd64645add7daa25a9ea
MD5 1d5e95e27a57cc81ebdf2bf668506fc7
BLAKE2b-256 9552516421980c725383c3b81e6ac35fdbb952245f489421ea990f9d6325fe4b

See more details on using hashes here.

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