| Name | uvicorn-ssl-restarter JSON |
| Version |
0.1.2
JSON |
| download |
| home_page | None |
| Summary | Add your description here |
| upload_time | 2024-10-25 10:03:25 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.9 |
| license | None |
| keywords |
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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
```sh
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:
```python
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:
```sh
uv sync
uv build
# make sure that UV_PUBLISH_TOKEN is populated with your pypi token
uv publish
```
Raw data
{
"_id": null,
"home_page": null,
"name": "uvicorn-ssl-restarter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fe/b0/7d192d8f456d65616886645daaec6c5319b59e7e8cad46fcd9ce9a32eeee/uvicorn_ssl_restarter-0.1.2.tar.gz",
"platform": null,
"description": "# Uvicorn SSL Restarter\n\nThis service is intended to be used with any uvicorn application to automatically restart it when new SSL-Certificates are available.\n\n## Usage\n\n```sh\npip install uvicorn-ssl-restarter\n```\n\nImport the `UvicornSSLRestarter` class into your `entrypoint.py` file. (Or wherever you start your Uvicorn server).\n\n```\nfrom app.uvicorn_ssl_restarter import UvicornSSLRestarter\n```\n\nStart the server using:\n\n```python\nuvicorn_ssl_restarter = UvicornSSLRestarter(\n app_path=\"app.main:app\",\n fallback_certs_dir=\"/app/fallback-certs\",\n real_certs_dir=\"/app/certs\",\n renew_check_interval=60*60*2, # Seconds between checks for new certificates\n server_port=443,\n)\nawait uvicorn_ssl_restarter.run()\n```\n\nChange variables as needed.\n\n## Publish package\n\nUpdate the version in the `pyproject.toml` and then run:\n\n```sh\nuv sync\nuv build\n# make sure that UV_PUBLISH_TOKEN is populated with your pypi token\nuv publish\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Add your description here",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "699a36fd5636f59dccbc324c00415ad3e5984c21f637d12a26ca918c8be605ce",
"md5": "4eeca53d3462c946110f1d02f725fea6",
"sha256": "9cd23fc700d7aa3e19814ecf635e55fc6ba1c6b43a3568a32284eb92bc811bd5"
},
"downloads": -1,
"filename": "uvicorn_ssl_restarter-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4eeca53d3462c946110f1d02f725fea6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2980,
"upload_time": "2024-10-25T10:01:35",
"upload_time_iso_8601": "2024-10-25T10:01:35.195113Z",
"url": "https://files.pythonhosted.org/packages/69/9a/36fd5636f59dccbc324c00415ad3e5984c21f637d12a26ca918c8be605ce/uvicorn_ssl_restarter-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "feb07d192d8f456d65616886645daaec6c5319b59e7e8cad46fcd9ce9a32eeee",
"md5": "bff85c7777f66f0f92d01541f286308e",
"sha256": "52f2685beea04ba211de4f9f81b1f9beafce8bd35d3d52e6a7d1f154981f6a02"
},
"downloads": -1,
"filename": "uvicorn_ssl_restarter-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "bff85c7777f66f0f92d01541f286308e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 16621224,
"upload_time": "2024-10-25T10:03:25",
"upload_time_iso_8601": "2024-10-25T10:03:25.725645Z",
"url": "https://files.pythonhosted.org/packages/fe/b0/7d192d8f456d65616886645daaec6c5319b59e7e8cad46fcd9ce9a32eeee/uvicorn_ssl_restarter-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 10:03:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "uvicorn-ssl-restarter"
}