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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for static_router-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ad8d3c6e5b3d1bb6bdd1817c4bfac5ea9cb8dea864a4151e2e56642c1c4dea0
MD5 312f5b227885b396d20ba51591db799e
BLAKE2b-256 1b1ed218fff8a480e8bfad01c4bcae5d61dbb6e535a47de907c862e45f214e9b

See more details on using hashes here.

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

Hashes for static_router-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80bbdeba9f78014fafe47d293dff0c52bcc0e328d5c7d4d1f8746c3136f3dca4
MD5 6b6c638e51463cde54ee9821353aad7e
BLAKE2b-256 7862b1304e6d4a323129f16e2e5071c4694efdf772c23bbfdffda8251cb13802

See more details on using hashes here.

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