https://github.com/nanotaboada/python-samples-fastapi-restful
🧪 Proof of Concept for a RESTful API made with Python 3 and FastAPI
https://github.com/nanotaboada/python-samples-fastapi-restful
fastapi integration-testing proof-of-concept pydantic python rest-api restful-api sqlalchemy sqlite
Last synced: 8 months ago
JSON representation
🧪 Proof of Concept for a RESTful API made with Python 3 and FastAPI
- Host: GitHub
- URL: https://github.com/nanotaboada/python-samples-fastapi-restful
- Owner: nanotaboada
- License: mit
- Created: 2021-08-16T00:47:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-29T12:07:37.000Z (9 months ago)
- Last Synced: 2025-03-29T13:22:29.015Z (9 months ago)
- Topics: fastapi, integration-testing, proof-of-concept, pydantic, python, rest-api, restful-api, sqlalchemy, sqlite
- Language: Python
- Homepage:
- Size: 798 KB
- Stars: 68
- Watchers: 2
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧪 RESTful API with Python 3 and FastAPI
## Status
[](https://github.com/nanotaboada/python-samples-fastapi-restful/actions/workflows/python-app.yml)
[](https://sonarcloud.io/summary/new_code?id=nanotaboada_python-samples-fastapi-restful)
[](https://app.codacy.com/gh/nanotaboada/python-samples-fastapi-restful/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://codecov.io/gh/nanotaboada/python-samples-fastapi-restful)
[](https://www.codefactor.io/repository/github/nanotaboada/python-samples-fastapi-restful)
[](https://codebeat.co/projects/github-com-nanotaboada-python-samples-fastapi-restful-master)
## About
Proof of Concept for a RESTful API made with [Python 3](https://www.python.org/) and [FastAPI](https://fastapi.tiangolo.com/).
## Structure

_Figure: Simplified, conceptual project structure and main application flow. Not all dependencies are shown._
## Install
```console
pip install -r requirements.txt
pip install -r requirements-lint.txt
pip install -r requirements-test.txt
```
## Start
```console
uvicorn main:app --reload --port 9000
```
## Docs
```console
http://localhost:9000/docs
```

## Docker
This project includes a multi-stage `Dockerfile` for local development and production builds.
### Build the image
```bash
docker build -t python-samples-fastapi-restful .
```
### Run the container
```bash
docker run -p 9000:9000 python-samples-fastapi-restful:latest
```
## Credits
The solution has been coded using [Visual Studio Code](https://code.visualstudio.com/) with the official [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extension.
## Terms
All trademarks, registered trademarks, service marks, product names, company names, or logos mentioned on this repository are the property of their respective owners. All usage of such terms herein is for identification purposes only and constitutes neither an endorsement nor a recommendation of those items. Furthermore, the use of such terms is intended to be for educational and informational purposes only.