Name | static_router JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-03-25 22:36:52 |
maintainer | None |
docs_url | None |
author | Sam Kenney |
requires_python | <4.0,>=3.11 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# StaticRouter
A static file routing solution for FastAPI.
```python
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
Raw data
{
"_id": null,
"home_page": null,
"name": "static_router",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Sam Kenney",
"author_email": "sam.kenney@me.com",
"download_url": "https://files.pythonhosted.org/packages/1b/1e/d218fff8a480e8bfad01c4bcae5d61dbb6e535a47de907c862e45f214e9b/static_router-0.1.0.tar.gz",
"platform": null,
"description": "# StaticRouter\n\nA static file routing solution for FastAPI.\n\n```python\nimport static_router\nfrom static_router.loaders import StaticContentLoader\n\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n# Other such fastapi things as required\n# ...\n\nloader = StaticContentLoader(directory=\"content\")\nstatic_router.register(app, content_loader=loader)\n```\n\nIn your templates, you may access the following variables:\n - `page` - This contains any frontmatter you have defined in your markdown content\n - `router` - The content router instance\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7862b1304e6d4a323129f16e2e5071c4694efdf772c23bbfdffda8251cb13802",
"md5": "6b6c638e51463cde54ee9821353aad7e",
"sha256": "80bbdeba9f78014fafe47d293dff0c52bcc0e328d5c7d4d1f8746c3136f3dca4"
},
"downloads": -1,
"filename": "static_router-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6b6c638e51463cde54ee9821353aad7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 6624,
"upload_time": "2024-03-25T22:36:45",
"upload_time_iso_8601": "2024-03-25T22:36:45.378371Z",
"url": "https://files.pythonhosted.org/packages/78/62/b1304e6d4a323129f16e2e5071c4694efdf772c23bbfdffda8251cb13802/static_router-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b1ed218fff8a480e8bfad01c4bcae5d61dbb6e535a47de907c862e45f214e9b",
"md5": "312f5b227885b396d20ba51591db799e",
"sha256": "6ad8d3c6e5b3d1bb6bdd1817c4bfac5ea9cb8dea864a4151e2e56642c1c4dea0"
},
"downloads": -1,
"filename": "static_router-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "312f5b227885b396d20ba51591db799e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 4832,
"upload_time": "2024-03-25T22:36:52",
"upload_time_iso_8601": "2024-03-25T22:36:52.656644Z",
"url": "https://files.pythonhosted.org/packages/1b/1e/d218fff8a480e8bfad01c4bcae5d61dbb6e535a47de907c862e45f214e9b/static_router-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-25 22:36:52",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "static_router"
}