Name | fastapi-offline-docs JSON |
Version |
1.0.1
JSON |
| download |
home_page | None |
Summary | Offline API docs for FastAPI |
upload_time | 2024-07-06 19:30:18 |
maintainer | None |
docs_url | None |
author | community-of-python |
requires_python | <4.0,>=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# fastapi-offline-docs
This package enables "offline mode" for FastAPI (in other words lets you avoid loading assets from CDN).
# Installation
```sh
poetry add fastapi-offline-docs
```
# Usage
Before:
```python
import fastapi
app = fastapi.FastAPI(docs_url="path/to/doc", redoc_url="path/to/redoc")
```
After:
```python
import fastapi
from fastapi_offline_docs import enable_offline_docs
app = fastapi.FastAPI(docs_url="path/to/doc", redoc_url="path/to/redoc")
enable_offline_docs(app)
```
Now, the assets for API docs are served locally, not from CDN.
See also: [litestar-offline-docs](https://github.com/community-of-python/litestar-offline-docs).
Raw data
{
"_id": null,
"home_page": null,
"name": "fastapi-offline-docs",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "community-of-python",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/39/63/27464f76e9784e6170e2626e9803012d0834e459b6be6b30f0b0eceab4d9/fastapi_offline_docs-1.0.1.tar.gz",
"platform": null,
"description": "# fastapi-offline-docs\n\nThis package enables \"offline mode\" for FastAPI (in other words lets you avoid loading assets from CDN).\n\n# Installation\n\n```sh\npoetry add fastapi-offline-docs\n```\n\n# Usage\n\nBefore:\n\n```python\nimport fastapi\n\napp = fastapi.FastAPI(docs_url=\"path/to/doc\", redoc_url=\"path/to/redoc\")\n```\n\nAfter:\n\n```python\nimport fastapi\nfrom fastapi_offline_docs import enable_offline_docs\n\napp = fastapi.FastAPI(docs_url=\"path/to/doc\", redoc_url=\"path/to/redoc\")\nenable_offline_docs(app)\n```\n\nNow, the assets for API docs are served locally, not from CDN.\n\nSee also: [litestar-offline-docs](https://github.com/community-of-python/litestar-offline-docs).\n",
"bugtrack_url": null,
"license": null,
"summary": "Offline API docs for FastAPI",
"version": "1.0.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b288b343be57e28a5b90fce17b0f70dcf2b429104b9ec9a7f9ada83ad23715c0",
"md5": "ae92aa16eba5bf3e8359b1672efdcac0",
"sha256": "f54710a228c51a7d1fe4a43c0cf49fba22bc10c04726eb3b2fd688b98e6d79b2"
},
"downloads": -1,
"filename": "fastapi_offline_docs-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae92aa16eba5bf3e8359b1672efdcac0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 751273,
"upload_time": "2024-07-06T19:30:16",
"upload_time_iso_8601": "2024-07-06T19:30:16.470082Z",
"url": "https://files.pythonhosted.org/packages/b2/88/b343be57e28a5b90fce17b0f70dcf2b429104b9ec9a7f9ada83ad23715c0/fastapi_offline_docs-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "396327464f76e9784e6170e2626e9803012d0834e459b6be6b30f0b0eceab4d9",
"md5": "0489539aafdc2525a18aeddd3ecff243",
"sha256": "eb40556b961a35a75f21d57fd027197bda9a7663002b8e850e3aedfd821392a0"
},
"downloads": -1,
"filename": "fastapi_offline_docs-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "0489539aafdc2525a18aeddd3ecff243",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 748351,
"upload_time": "2024-07-06T19:30:18",
"upload_time_iso_8601": "2024-07-06T19:30:18.480960Z",
"url": "https://files.pythonhosted.org/packages/39/63/27464f76e9784e6170e2626e9803012d0834e459b6be6b30f0b0eceab4d9/fastapi_offline_docs-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-06 19:30:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "fastapi-offline-docs"
}