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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file static_router-0.1.0.tar.gz.
File metadata
- Download URL: static_router-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad8d3c6e5b3d1bb6bdd1817c4bfac5ea9cb8dea864a4151e2e56642c1c4dea0
|
|
| MD5 |
312f5b227885b396d20ba51591db799e
|
|
| BLAKE2b-256 |
1b1ed218fff8a480e8bfad01c4bcae5d61dbb6e535a47de907c862e45f214e9b
|
File details
Details for the file static_router-0.1.0-py3-none-any.whl.
File metadata
- Download URL: static_router-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80bbdeba9f78014fafe47d293dff0c52bcc0e328d5c7d4d1f8746c3136f3dca4
|
|
| MD5 |
6b6c638e51463cde54ee9821353aad7e
|
|
| BLAKE2b-256 |
7862b1304e6d4a323129f16e2e5071c4694efdf772c23bbfdffda8251cb13802
|