Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 653 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 653 Bytes

litestar-offline-docs

This package enables "offline mode" for FastAPI (in other words lets you avoid loading assets from CDN).

Installation

poetry add litestar-offline-docs

Usage

Just construct static file handler and add it to Litestar application during initialization:

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.