--- id: fastapi-offline version: "1.7.7" license: MIT license_treatment: permissive maintenance: active --- # fastapi-offline — FastAPI without reliance on CDNs for docs License: permissive · Maintenance: active · Downloads: 309.4K/mo ## What it is and what it does FastAPI-offline is a drop-in replacement for FastAPI that bundles Swagger UI and Redoc documentation assets locally instead of fetching them from external CDNs. This solves the problem of API documentation becoming inaccessible in disconnected networks, air-gapped environments, or situations where external CDN access is restricted or unreliable. The package automates what the official FastAPI documentation describes as a manual process: it includes the necessary JavaScript and CSS files for both Swagger and Redoc, serves them locally, and configures a FastAPI instance to use them. You instantiate FastAPIOffline instead of FastAPI, optionally customize the static asset path or favicon, and everything else works as normal—all FastAPI options pass through unchanged. Use it for: - Running FastAPI services in air-gapped or disconnected networks where external CDN access is unavailable or forbidden. - Deploying API documentation in environments with strict network policies or firewall rules that block CDN domains. - Ensuring API docs remain accessible even if external CDN services experience outages or performance degradation. - Building self-contained Docker images or offline-first deployments where all dependencies must be bundled locally. - Customizing documentation UI appearance by serving your own favicon alongside the standard Swagger and Redoc interfaces. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Replaces FastAPI's CDN-dependent documentation UI with locally-served Swagger and Redoc assets, enabling API docs to work on disconnected or air-gapped networks. Yes. If you need FastAPI documentation to work without CDN access, this package solves that problem with minimal friction—a single dependency, permissive licensing, active maintenance, and a straightforward API. Install it when disconnected networks, air-gapped deployments, or strict network policies make CDN-dependent docs impractical. ## Install pip install fastapi-offline uv add fastapi-offline poetry add fastapi-offline ## Installing fastapi-offline Before you install: Low friction: single runtime dependency (fastapi), pure Python wheel distribution. Active maintenance with a recent release (56 days ago) and an archived repository status of false. License in practice: MIT-licensed code with permissive terms; includes Apache 2.0 Swagger and MIT-licensed Redoc and favicon assets bundled in the package. All original licenses and copyrights are preserved. Quickstart: pip install fastapi-offline from fastapi_offline import FastAPIOffline app = FastAPIOffline() @app.get("/") async def root(): return {"message": "Hello World"} Requires Python 3.8 or later. Verify before relying: - Whether static asset serving works correctly behind reverse proxies or non-root paths beyond the documented static_url parameter. - Performance impact of serving bundled documentation assets compared to CDN delivery in typical deployments. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 309.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fastapi offline documentation, self-hosted swagger ui, local api docs without cdn, air-gapped fastapi docs, fastapi disconnected network, redoc local serving, fastapi docs no internet, offline-first, air-gapped, documentation-serving [View on SkillFed](https://skillfed.io/packages/fastapi-offline) · [View on PyPI](https://pypi.org/project/fastapi-offline/)