Skip to main content

A markdown documentation renderer for FastAPI

Project description

CI codecov pypi downloads Socket Badge

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("./userdocs"), prefix="/userdocs")

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

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/userdocs

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.6.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.6-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_docs-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 438097a1ee7f607001d30c55f0859f0ae6c4f6b551034b3f43427d307757e867
MD5 d58f51f9ca3b1fd10f9821abb60b7ea5
BLAKE2b-256 9572f22373218120f4dde9f88e44da3b6701412921fa7ba1b016cf3dbf37ac49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapi_docs-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 16.7 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d71d96cefa5eb12a23e7e5174663982730ac2e29dfd883744e43da5c1292a658
MD5 9b05bf8366e6527e8486e764ba01677f
BLAKE2b-256 ee9da1124ffd96aca814fb7da4a546d9a5612d29cfa596879ad65fb834a2f55a

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