# FastAPI Utils
FastAPI utilities for rapid development.
## Features
- Database Management
- Easy database initialization
- Entity base class with common fields
- YAML/JSON configuration support
- Router Management
- Decorator-based routing
- Auto-scanning controllers
- Easy route grouping
## Installation
```bash
pip install fastapi-core-utils
```
## Quick Start
```python
from fastapi import FastAPI
from fastapi_core_utils.router import RouterManager, controller, route
from fastapi_core_utils.database import DBManager
app = FastAPI()
# Initialize database
await DBManager.init_db(
app=app,
config="config/database.yaml",
entity_dir="fastapi_core_utils/entity"
)
# Define controller
@controller(prefix="/api", tags=["example"])
class ExampleController:
@route.get("/hello")
async def hello(self):
return {"message": "Hello World"}
# Auto include controllers
RouterManager.auto_include_routers(
app=app,
controllers_dir="app/src/controllers"
)
```
## Documentation
For more details, please visit our [GitHub repository](https://github.com/yourusername/fastapi-core-utils).
## License
This project is licensed under the MIT License.
```shell
rm -rf dist/ build/ *.egg-info/
```
```shell
python -m build
```
```shell
python -m twine upload dist/*
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fastapi-core-utils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "fastapi, utils, database, router",
"author": null,
"author_email": "\u5218\u6d69 <jiumengs@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ae/4f/1ff7f13ae004668a3af8480bd59ad132dd279969c200a38bb02ef65e9ed9/fastapi_core_utils-0.0.6.tar.gz",
"platform": null,
"description": "# FastAPI Utils\n\nFastAPI utilities for rapid development.\n\n## Features\n\n- Database Management\n - Easy database initialization\n - Entity base class with common fields\n - YAML/JSON configuration support\n\n- Router Management\n - Decorator-based routing\n - Auto-scanning controllers\n - Easy route grouping\n\n## Installation\n\n```bash\npip install fastapi-core-utils\n```\n\n## Quick Start\n\n```python\nfrom fastapi import FastAPI\nfrom fastapi_core_utils.router import RouterManager, controller, route\nfrom fastapi_core_utils.database import DBManager\n\napp = FastAPI()\n\n# Initialize database\nawait DBManager.init_db(\n app=app,\n config=\"config/database.yaml\",\n entity_dir=\"fastapi_core_utils/entity\"\n)\n\n\n# Define controller\n@controller(prefix=\"/api\", tags=[\"example\"])\nclass ExampleController:\n @route.get(\"/hello\")\n async def hello(self):\n return {\"message\": \"Hello World\"}\n\n\n# Auto include controllers\nRouterManager.auto_include_routers(\n app=app,\n controllers_dir=\"app/src/controllers\"\n)\n```\n\n## Documentation\n\nFor more details, please visit our [GitHub repository](https://github.com/yourusername/fastapi-core-utils).\n\n## License\n\nThis project is licensed under the MIT License. \n\n\n\n```shell\nrm -rf dist/ build/ *.egg-info/\n```\n```shell\npython -m build\n```\n```shell\npython -m twine upload dist/*\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "FastAPI utilities for rapid development",
"version": "0.0.6",
"project_urls": {
"Documentation": "https://github.com/yourusername/fastapi-core-utils#readme",
"Homepage": "https://github.com/yourusername/fastapi-core-utils",
"Repository": "https://github.com/yourusername/fastapi-core-utils.git"
},
"split_keywords": [
"fastapi",
" utils",
" database",
" router"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ae60d7c603751499b68d5576985bafebdf5ec0fc5bd855ab25a7bc9704053f34",
"md5": "ca064cc46587802cb4c26690f56dbc1b",
"sha256": "a32b1c3435056f24af570c9b1b27be2518ea768e9504a5cf586c0387e472e378"
},
"downloads": -1,
"filename": "fastapi_core_utils-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ca064cc46587802cb4c26690f56dbc1b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 23655,
"upload_time": "2025-01-19T07:01:01",
"upload_time_iso_8601": "2025-01-19T07:01:01.409654Z",
"url": "https://files.pythonhosted.org/packages/ae/60/d7c603751499b68d5576985bafebdf5ec0fc5bd855ab25a7bc9704053f34/fastapi_core_utils-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ae4f1ff7f13ae004668a3af8480bd59ad132dd279969c200a38bb02ef65e9ed9",
"md5": "abcf0c283f1cf66d5752def8d0dca91e",
"sha256": "2391de795f56fbc400212053a01f7503b2ffb4191294b7dd3154af40bf272370"
},
"downloads": -1,
"filename": "fastapi_core_utils-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "abcf0c283f1cf66d5752def8d0dca91e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 17480,
"upload_time": "2025-01-19T07:01:03",
"upload_time_iso_8601": "2025-01-19T07:01:03.377203Z",
"url": "https://files.pythonhosted.org/packages/ae/4f/1ff7f13ae004668a3af8480bd59ad132dd279969c200a38bb02ef65e9ed9/fastapi_core_utils-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 07:01:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "fastapi-core-utils#readme",
"github_not_found": true,
"lcname": "fastapi-core-utils"
}