Skip to main content

A markdown documentation renderer for FastAPI

Project description

fastapi-docs

A markdown documentation renderer for FastAPI applications.

Features

  • 📁 Directory-based navigation from your markdown file structure
  • 🔍 Full-text search across all documents
  • 🎨 Syntax highlighting for Python, JavaScript, bash, C#, HTML
  • 🌙 Automatic dark mode based on system preference
  • 📱 Responsive design for mobile and desktop
  • ⚡ Hot-reload during development
  • 📑 Table of contents for each page
  • 🔗 Previous/next navigation

Installation

pip install -e .

Quick Start

from fastapi import FastAPI
from fastapi_docs import create_docs_router, DocsConfig

app = FastAPI()

# Simple usage
app.include_router(create_docs_router("./docs"), prefix="/docs")

# Or with configuration
config = DocsConfig(
    docs_dir="./docs",
    title="My API Docs",
    auto_refresh=True,
)
app.include_router(create_docs_router(config), prefix="/docs")

Markdown Frontmatter

Each markdown file can include YAML frontmatter:

---
title: Getting Started
order: 1
description: Learn how to get started
tags:
  - quickstart
hidden: false
---

# Getting Started

Your content here...

Running the Example

pip install -e ".[dev]"
uvicorn example_app:app --reload

Then visit http://localhost:8000/docs/

License

MIT

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_docs-0.1.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

fastapi_docs-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_docs-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi_docs-0.1.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fastapi_docs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3ce674a913d5184aeb3adb9c5c6bba2bfc8077f39ab6bdcd412081266b3d702
MD5 1fe797547ba0c30ead3e176be4c1fdf3
BLAKE2b-256 7df1486c1784189c954ac986288c84946d5aee2f8ec23b74a793123ad674b5ca

See more details on using hashes here.

File details

Details for the file fastapi_docs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastapi_docs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fastapi_docs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8771f4c6d66329f886296b752750a3e23beda54cc40201fecc3d013a3749e2c6
MD5 464e9cb12633c70d4e5cba496b93fd2b
BLAKE2b-256 71cbccc4b532ac47956c686ba310aa0fed464c5ea3e21cdbdebd1e670ff4cd83

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