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

Uploaded Source

Built Distribution

fastapi_offline_docs-1.0.1-py3-none-any.whl (751.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_offline_docs-1.0.1.tar.gz
  • Upload date:
  • Size: 748.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure

File hashes

Hashes for fastapi_offline_docs-1.0.1.tar.gz
Algorithm Hash digest
SHA256 eb40556b961a35a75f21d57fd027197bda9a7663002b8e850e3aedfd821392a0
MD5 0489539aafdc2525a18aeddd3ecff243
BLAKE2b-256 396327464f76e9784e6170e2626e9803012d0834e459b6be6b30f0b0eceab4d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_offline_docs-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f54710a228c51a7d1fe4a43c0cf49fba22bc10c04726eb3b2fd688b98e6d79b2
MD5 ae92aa16eba5bf3e8359b1672efdcac0
BLAKE2b-256 b288b343be57e28a5b90fce17b0f70dcf2b429104b9ec9a7f9ada83ad23715c0

See more details on using hashes here.

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