0xTheProDev/fastapi-clean-example
حول
Clean Architecture Example using FastAPI framework
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلfastapi-clean-example
Description
Example Application Interface using FastAPI framework in Python 3
This example showcases Repository Pattern in Hexagonal Architecture (also known as Clean Architecture). Here we have two Entities - Books and Authors, whose relationships have been exploited to create CRUD endpoint in REST under OpenAPI standard.
Installation
Install all the project dependency using Pipenv:
$ pipenv install --devRun the application from command prompt:
$ pipenv run uvicorn main:app --reloadYou can also open a shell inside virtual environment:
$ pipenv shellOpen
localhost:8000/docsfor API DocumentationOpen
localhost:8000/graphqlfor GraphQL Documentation
Note: In case you are not able to access pipenv from you PATH locations, replace all instances of pipenv with python3 -m pipenv.
Testing
For Testing, unittest module is used for Test Suite and Assertion, whereas pytest is being used for Test Runner and Coverage Reporter.
- Run the following command to initiate test:
$ pipenv run pytest - To include Coverage Reporting as well:
$ pipenv run pytest --cov-report xml --cov .
License
© MIT License
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…