You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

uvicorn-worker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uvicorn-worker

Uvicorn worker for Gunicorn! ✨


Maintainers
1

Readme

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc