Skip to main content

No project description provided

Project description

StaticRouter

A static file routing solution for FastAPI.

import static_router
from static_router.loaders import StaticContentLoader

from fastapi import FastAPI

app = FastAPI()

# Other such fastapi things as required
# ...

loader = StaticContentLoader(directory="content")
static_router.register(app, content_loader=loader)

In your templates, you may access the following variables:

  • page - This contains any frontmatter you have defined in your markdown content
  • router - The content router instance

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

static_router-0.1.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

static_router-0.1.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

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