Skip to main content

Uvicorn worker for Gunicorn! ✨

Project description

Uvicorn Worker

The Uvicorn Worker is a package designed for the mature and comprehensive server and process manager, Gunicorn. This package allows you to run ASGI applications, leverages Uvicorn's high-performance capabilities, and provides Gunicorn's robust process management.

By using this package, you can dynamically adjust the number of worker processes, restart them gracefully, and execute server upgrades without any service interruption.

Getting Started

Installation

You can easily install the Uvicorn Worker package using pip:

pip install uvicorn-worker

Deployment

For production environments, it's recommended to utilize Gunicorn with the Uvicorn worker class. Below is an example of how to do this:

gunicorn example:app -w 4 -k uvicorn_worker.UvicornWorker

In the above command, -w 4 instructs Gunicorn to initiate 4 worker processes, and -k uvicorn_worker.UvicornWorker flag tells Gunicorn to use the Uvicorn worker class.

If you're working with a PyPy compatible configuration, you should use uvicorn_worker.UvicornH11Worker.

Development

During development, you can directly run Uvicorn as follows:

uvicorn example:app --reload

The --reload flag will automatically reload the server when you make changes to your code.

For more information read the Uvicorn documentation.

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

uvicorn_worker-0.2.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

uvicorn_worker-0.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file uvicorn_worker-0.2.0.tar.gz.

File metadata

  • Download URL: uvicorn_worker-0.2.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for uvicorn_worker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f6894544391796be6eeed37d48cae9d7739e5a105f7e37061eccef2eac5a0295
MD5 9374538d7606c3f894ed06fbc9cbbc61
BLAKE2b-256 d97aa4b06ea7ece47f6b020671209912a505f8eef1812e02a68cb25d71ee0e8d

See more details on using hashes here.

File details

Details for the file uvicorn_worker-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uvicorn_worker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65dcef25ab80a62e0919640f9582216ee05b3bb1dc2f0e58b354ca0511c398fb
MD5 ea8be6da8cf696d02c473cf1c9313ab0
BLAKE2b-256 9e9c5ead3efe80abb7ba5e2764650a050e7c25d8a75228543a1e63ce321186c3

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