{"id":17817907,"url":"https://github.com/0xtheprodev/fastapi-clean-example","last_synced_at":"2025-04-05T19:10:28.636Z","repository":{"id":38454134,"uuid":"479982630","full_name":"0xTheProDev/fastapi-clean-example","owner":"0xTheProDev","description":"Clean Architecture Example using FastAPI framework","archived":false,"fork":false,"pushed_at":"2023-05-12T09:03:57.000Z","size":103,"stargazers_count":441,"open_issues_count":0,"forks_count":58,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T18:06:17.594Z","etag":null,"topics":["clean-architecture","fastapi","graphql","hexagonal-architecture","openapi3","pydantic","python","python3","repository-pattern","rest-api","starlette","strawberry-graphql","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xTheProDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"0xTheProDev"}},"created_at":"2022-04-10T10:23:51.000Z","updated_at":"2025-03-28T14:21:25.000Z","dependencies_parsed_at":"2024-10-27T17:18:28.950Z","dependency_job_id":"a16c4a8c-ff41-4711-8454-e0ff05dbfefc","html_url":"https://github.com/0xTheProDev/fastapi-clean-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTheProDev%2Ffastapi-clean-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTheProDev%2Ffastapi-clean-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTheProDev%2Ffastapi-clean-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xTheProDev%2Ffastapi-clean-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xTheProDev","download_url":"https://codeload.github.com/0xTheProDev/fastapi-clean-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386262,"owners_count":20930619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","fastapi","graphql","hexagonal-architecture","openapi3","pydantic","python","python3","repository-pattern","rest-api","starlette","strawberry-graphql","swagger","swagger-ui"],"created_at":"2024-10-27T16:46:41.081Z","updated_at":"2025-04-05T19:10:28.614Z","avatar_url":"https://github.com/0xTheProDev.png","language":"Python","funding_links":["https://github.com/sponsors/0xTheProDev"],"categories":[],"sub_categories":[],"readme":"# fastapi-clean-example\n\n[![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)](https://docs.python.org/3/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge\u0026logo=fastapi)](https://fastapi.tiangolo.com/)\n[![OpenAPI](https://img.shields.io/badge/openapi-6BA539?style=for-the-badge\u0026logo=openapi-initiative\u0026logoColor=fff)](https://www.openapis.org/)\n[![Swagger](https://img.shields.io/badge/-Swagger-%23Clojure?style=for-the-badge\u0026logo=swagger\u0026logoColor=white)](https://swagger.io/)\n[![GraphQL](https://img.shields.io/badge/-GraphQL-E10098?style=for-the-badge\u0026logo=graphql\u0026logoColor=white)](https://graphql.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://black.readthedocs.io/en/stable/)\n[![Typed with: pydantic](https://img.shields.io/badge/typed%20with-pydantic-BA600F.svg?style=for-the-badge)](https://docs.pydantic.dev/)\n[![Open Issues](https://img.shields.io/github/issues-raw/0xTheProDev/fastapi-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/fastapi-clean-example/issues)\n[![Closed Issues](https://img.shields.io/github/issues-closed-raw/0xTheProDev/fastapi-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/fastapi-clean-example/issues?q=is%3Aissue+is%3Aclosed)\n[![Open Pulls](https://img.shields.io/github/issues-pr-raw/0xTheProDev/fastapi-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/fastapi-clean-example/pulls)\n[![Closed Pulls](https://img.shields.io/github/issues-pr-closed-raw/0xTheProDev/fastapi-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/fastapi-clean-example/pulls?q=is%3Apr+is%3Aclosed)\n[![Contributors](https://img.shields.io/github/contributors/0xTheProDev/fastapi-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/fastapi-clean-example/graphs/contributors)\n[![Activity](https://img.shields.io/github/last-commit/0xTheProDev/fastapi-clean-example?style=for-the-badge\u0026label=most%20recent%20activity)](https://github.com/0xTheProDev/fastapi-clean-example/pulse)\n\n## Description\n\n_Example Application Interface using FastAPI framework in Python 3_\n\nThis 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.\n\n## Installation\n\n- Install all the project dependency using [Pipenv](https://pipenv.pypa.io):\n\n  ```sh\n  $ pipenv install --dev\n  ```\n\n- Run the application from command prompt:\n\n  ```sh\n  $ pipenv run uvicorn main:app --reload\n  ```\n\n- You can also open a shell inside virtual environment:\n\n  ```sh\n  $ pipenv shell\n  ```\n\n- Open `localhost:8000/docs` for API Documentation\n\n- Open `localhost:8000/graphql` for GraphQL Documentation\n\n_*Note:* In case you are not able to access `pipenv` from you `PATH` locations, replace all instances of `pipenv` with `python3 -m pipenv`._\n\n## Testing\n\nFor Testing, `unittest` module is used for Test Suite and Assertion, whereas `pytest` is being used for Test Runner and Coverage Reporter.\n\n- Run the following command to initiate test:\n  ```sh\n  $ pipenv run pytest\n  ```\n- To include Coverage Reporting as well:\n  ```sh\n  $ pipenv run pytest --cov-report xml --cov .\n  ```\n\n## License\n\n\u0026copy; MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtheprodev%2Ffastapi-clean-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtheprodev%2Ffastapi-clean-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtheprodev%2Ffastapi-clean-example/lists"}