https://github.com/evernext10/fastapi-inventory-python
https://github.com/evernext10/fastapi-inventory-python
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/evernext10/fastapi-inventory-python
- Owner: evernext10
- Created: 2022-11-23T14:37:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-23T19:36:34.000Z (over 3 years ago)
- Last Synced: 2025-11-16T06:15:12.964Z (8 months ago)
- Language: Python
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI-Inventory-python
## Description
_Python Challenge to make API using FastAPI_
This challenge showcases Repository Pattern in Hexagonal Architecture _(also known as Clean Architecture)_. Here we have one Entity - Product to create CRUD endpoint in REST under OpenAPI standard.
## Installation
- Install all the project dependency using [Pipenv](https://pipenv.pypa.io):
```sh
$ pipenv install --dev
$ pip install -r requirements.txt
```
- Run the application from command prompt:
```sh
$ pipenv run uvicorn main:app --reload
```
- You can also open a shell inside virtual environment:
```sh
$ pipenv shell
```
- Open `localhost:8000/docs` for API 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:
```sh
$ pipenv run pytest
```
- To include Coverage Reporting as well:
```sh
$ pipenv run pytest --cov-report xml --cov .
```