https://github.com/fanqingsong/fastapi-hive
FastAPI Hive Framework, cornerstones & endpoints code structure, developer-friendly, easy to be applied.
https://github.com/fanqingsong/fastapi-hive
dependecy-inversion-principle fastapi ioc-framework machine-learning
Last synced: 4 months ago
JSON representation
FastAPI Hive Framework, cornerstones & endpoints code structure, developer-friendly, easy to be applied.
- Host: GitHub
- URL: https://github.com/fanqingsong/fastapi-hive
- Owner: fanqingsong
- License: apache-2.0
- Created: 2022-09-17T11:52:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-09T14:24:52.000Z (over 1 year ago)
- Last Synced: 2025-07-17T17:24:12.610Z (11 months ago)
- Topics: dependecy-inversion-principle, fastapi, ioc-framework, machine-learning
- Language: Python
- Homepage: https://fanqingsong.github.io/fastapi-hive/
- Size: 3.97 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastAPI Hive


FastAPI Hive Framework, modulization code layout tools, decoupling codes into cornerstones and endpoints, developer-friendly, easy to be integrated
[](https://github.com/fanqingsong/fastapi-hive/actions)
[](https://codecov.io/gh/fanqingsong/fastapi-hive)
[](https://pypi.org/project/requests)
[](https://badge.fury.io/py/fastapi-hive)
[](https://github.com/fanqingsong/fastapi-hive)
[](https://pepy.tech/project/fastapi-hive)
The classical code structure is compliant with function components view with the function folders, such as "api" folder for router registering, "models" folder for db and pydantic data model, just like [fastapi-ml-skeleton](https://github.com/eightBEC/fastapi-ml-skeleton).
But from the system design view, the system is divided into serveral sub-service, such as "heartbeat" service and "house_price" service in the above example, each of two services contains "api" and "model" function components.
With the help of fastapi-hive container_name, you can layout code structure by service style. For each service, it is defined as one endpoint, the codes are gathered in one endpoint folder, Also for the common functions, like db, auth, etc..., they are defined as cornerstones which are for constructing the hive(bee's home), and every bee are endpoints to go to hive.
Go to detailed site for more information [FastAPI Hive](https://fanqingsong.github.io/fastapi-hive/)
This repository contains a example app with cornerstones and endpoints folder which can be used to speed-up your next machine learning project. The code is fully tested and provides a preconfigured `tox` to quickly expand this sample code.
To experiment and get a feeling on how to use this framework, follow the installation and setup instructions to run the example app and serve it with RESTful API, go to [FastAPI Hive](https://fanqingsong.github.io/fastapi-hive/) for guide.