Metadata-Version: 2.3
Name: uvicorn-ssl-restarter
Version: 0.1.1
Summary: Add your description here
Requires-Python: >=3.10
Requires-Dist: loguru>=0.7.2
Requires-Dist: pyopenssl>=24.2.1
Requires-Dist: uvicorn>=0.31.1
Description-Content-Type: text/markdown

# 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.
