Add your description here
Project description
Uvicorn SSL Restarter
This service is intended to be used with any uvicorn application to automatically restart it when new SSL-Certificates are available.
Usage
pip install uvicorn-ssl-restarter
Import the UvicornSSLRestarter class into your entrypoint.py file. (Or wherever you start your Uvicorn server).
from app.uvicorn_ssl_restarter import UvicornSSLRestarter
Start the server using:
uvicorn_ssl_restarter = UvicornSSLRestarter(
app_path="app.main:app",
fallback_certs_dir="/app/fallback-certs",
real_certs_dir="/app/certs",
renew_check_interval=60*60*2, # Seconds between checks for new certificates
server_port=443,
)
await uvicorn_ssl_restarter.run()
Change variables as needed.
Publish package
Update the version in the pyproject.toml and then run:
uv sync
uv build
# make sure that UV_PUBLISH_TOKEN is populated with your pypi token
uv publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for uvicorn_ssl_restarter-0.1.2.tar.gz
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 52f2685beea04ba211de4f9f81b1f9beafce8bd35d3d52e6a7d1f154981f6a02 |
|
| MD5 | bff85c7777f66f0f92d01541f286308e |
|
| BLAKE2b-256 | feb07d192d8f456d65616886645daaec6c5319b59e7e8cad46fcd9ce9a32eeee |
Close
Hashes for uvicorn_ssl_restarter-0.1.2-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 9cd23fc700d7aa3e19814ecf635e55fc6ba1c6b43a3568a32284eb92bc811bd5 |
|
| MD5 | 4eeca53d3462c946110f1d02f725fea6 |
|
| BLAKE2b-256 | 699a36fd5636f59dccbc324c00415ad3e5984c21f637d12a26ca918c8be605ce |