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(
virtual_host="example.com",
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uvicorn_ssl_restarter-0.1.4.tar.gz.
File metadata
- Download URL: uvicorn_ssl_restarter-0.1.4.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1ac562ea3a4babc17153bb22ff9764415002f6abbe0f2a0d76f4706decb3519
|
|
| MD5 |
fd373ebf8bb3065bea0dd7af7eb202e1
|
|
| BLAKE2b-256 |
c2347c4bec2cb333a903a798292002306af55832176790bd065fd739949f4ee4
|
File details
Details for the file uvicorn_ssl_restarter-0.1.4-py3-none-any.whl.
File metadata
- Download URL: uvicorn_ssl_restarter-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
724afd1dbab3148bfc4b05a5cef00b613e1c2a44ba1f6efeaa964f093459f92f
|
|
| MD5 |
17de6d8ef9fa3c6f0d1c26e224e7d978
|
|
| BLAKE2b-256 |
725d89812fffa744b04c63edd84b72af43d54dbfe203a27c31e42b41888a69c6
|