Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 2 months ago
JSON representation

Offline API docs for Litestar

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 litestar

from 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).