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 contentrouter
- The content router instance
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for static_router-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80bbdeba9f78014fafe47d293dff0c52bcc0e328d5c7d4d1f8746c3136f3dca4 |
|
MD5 | 6b6c638e51463cde54ee9821353aad7e |
|
BLAKE2b-256 | 7862b1304e6d4a323129f16e2e5071c4694efdf772c23bbfdffda8251cb13802 |