Skip to main content

Simple reusable RapiDoc router for FastAPI OpenAPI specs

Project description

fastapi-rapidoc-router

PyPI version

Simple reusable RapiDoc router for FastAPI projects.

PyPI: https://pypi.org/project/fastapi-rapidoc-router/

Install

pip install fastapi-rapidoc-router

Development Install

From local source:

pip install -e .

Or from a Git repository:

pip install git+https://github.com/<your-org>/<your-repo>.git

Usage

from fastapi import FastAPI
from rapidoc_fastapi import mount_rapidoc

app = FastAPI(docs_url=None, redoc_url=None)

@app.get("/health")
def health() -> dict[str, str]:
    return {"status": "ok"}

mount_rapidoc(app, docs_path="/docs", title="My API Docs")

Router API

from rapidoc_fastapi import create_rapidoc_router

router = create_rapidoc_router(
    docs_path="/docs",
    openapi_url="/openapi.json",
    title="My API Docs",
)

app.include_router(router)

Notes

  • docs_path controls where RapiDoc UI is served.
  • openapi_url defaults to the app OpenAPI endpoint.
  • This package uses the official RapiDoc script from CDN by default.

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_rapidoc_router-0.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

fastapi_rapidoc_router-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_rapidoc_router-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_rapidoc_router-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastapi_rapidoc_router-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d2dd858b46b570d1500f9a5c872dabda7b6117d1e18b02c7e7f6ba23fd05be4b
MD5 f3b987d0fca287085f5054da1af783fe
BLAKE2b-256 38adede6499837ab85809ff0337ad1fa3427ee5646fda99dd82e69ed25041c25

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_rapidoc_router-0.1.2.tar.gz:

Publisher: publish-pypi.yml on Kinjalrk2k/rapidoc-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastapi_rapidoc_router-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_rapidoc_router-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ac217640692740df27e1b2717f67d6da3e166495bce6ce21a7e3aa66753732fa
MD5 d61c1d74b7825f546abdf8f8773df862
BLAKE2b-256 29ba289728a3f1728633f8717bcd2b4f99fd18716b669a87f10fb78ab4f5fcfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastapi_rapidoc_router-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on Kinjalrk2k/rapidoc-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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