Run either gunicorn or uvicorn depending on whether reloading is needed.
Project description
gunicorn-uvicorn-runner
Run either gunicorn or uvicorn depending on whether reloading is needed.
Getting started
- Install a recent Python 3.x version (if you don't already have one).
- Create a Python web project (if you don't already have one) - for example a FastAPI based project.
- Install
gunicorn-uvicorn-runner
as a dependency using Poetry, pip, or similar:poetry add gunicorn-uvicorn-runner
- Use it:
from gunicorn_uvicorn_runner import run_gunicorn_or_uvicorn if __name__ == "__main__": run_gunicorn_or_uvicorn("myproject.main:app", "1.2.3.4", 8042, True)
Developing
To clone the repo:
git clone git@github.com:Jaza/gunicorn-uvicorn-runner.git
To automatically fix code style issues:
./scripts/format.sh
To verify code style and static typing:
./scripts/verify.sh
To run tests:
./scripts/test.sh
Building
To build the library:
poetry build
Built by Seertech.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for gunicorn_uvicorn_runner-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e76c9e500a157ea78eabbc85bf61805462b11d9217bca7b47c267cacadb61b6 |
|
MD5 | e21f4135dfaaa5d866fde234a3ed09d6 |
|
BLAKE2b-256 | 32f8f73996b9781c1144710c438c7bcb6afeca256bea3d3c905ff05573f4e4ff |