https://github.com/community-of-python/litestar-offline-docs
Offline API docs for Litestar
https://github.com/community-of-python/litestar-offline-docs
Last synced: 3 months ago
JSON representation
Offline API docs for Litestar
- Host: GitHub
- URL: https://github.com/community-of-python/litestar-offline-docs
- Owner: community-of-python
- Created: 2024-07-05T15:26:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T09:24:54.000Z (5 months ago)
- Last Synced: 2025-04-04T12:01:43.810Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.1 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# litestar-offline-docs
This package enables "offline mode" for FastAPI (in other words lets you avoid loading assets from CDN).
# Installation
```sh
poetry add litestar-offline-docs
```# Usage
Just construct static file handler and add it to Litestar application during initialization:
```python
import litestarfrom litestar_offline_docs import generate_static_files_config
app = litestar.Litestar(
static_files_config=[generate_static_files_config()],
...
)
```That's it. Now, the assets for API docs are served locally, not from CDN.
See also: [fastapi-offline-docs](https://github.com/community-of-python/fastapi-offline-docs).