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.1.0.tar.gz (748.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_offline_docs-1.1.0-py3-none-any.whl (751.2 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_offline_docs-1.1.0.tar.gz.

File metadata

File hashes

Hashes for fastapi_offline_docs-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3c6453a2480bada0d3eb165ab396b265ba92ee6650110807293d7d34ccb816df
MD5 89323667c82d6bf3a81ed8cbb3e95bba
BLAKE2b-256 ebb38ccaea776ccb5ab4a887876fbfccf72efa08a4277c0cb9021f31942f818e

See more details on using hashes here.

File details

Details for the file fastapi_offline_docs-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_offline_docs-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fee49e387b46b365e8bb70212b57306676517225b6c0ef9f92d63914f167e607
MD5 b4b754c623385ad038b390b99ee8cd8e
BLAKE2b-256 52482a47c05bc1e8ba145472ca52d9a0e59c975cbe59cfabead74c66be106a4f

See more details on using hashes here.

Supported by

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