Skip to main content

Offline API docs for FastAPI

Project description

fastapi-offline-docs

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

Installation

poetry add fastapi-offline-docs

Usage

Before:

import fastapi

app = fastapi.FastAPI(docs_url="path/to/doc", redoc_url="path/to/redoc")

After:

import fastapi
from fastapi_offline_docs import enable_offline_docs

app = fastapi.FastAPI(docs_url="path/to/doc", redoc_url="path/to/redoc")
enable_offline_docs(app)

Now, the assets for API docs are served locally, not from CDN.

See also: litestar-offline-docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_offline_docs-1.0.0.tar.gz (748.1 kB view hashes)

Uploaded Source

Built Distribution

fastapi_offline_docs-1.0.0-py3-none-any.whl (751.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page