Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pouyapouryaie/fastapi-mongo
This project demonstrates a simple FastAPI application that connects to a MongoDB database and implements CRUD (Create, Read, Update, Delete) operations for a "Todo" model.
https://github.com/pouyapouryaie/fastapi-mongo
fastapi pydantic pymongo python
Last synced: 1 day ago
JSON representation
This project demonstrates a simple FastAPI application that connects to a MongoDB database and implements CRUD (Create, Read, Update, Delete) operations for a "Todo" model.
- Host: GitHub
- URL: https://github.com/pouyapouryaie/fastapi-mongo
- Owner: PouyaPouryaie
- Created: 2024-07-21T19:39:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T21:29:45.000Z (4 months ago)
- Last Synced: 2024-07-29T20:41:24.925Z (4 months ago)
- Topics: fastapi, pydantic, pymongo, python
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# FastAPI CRUD with MongoDB
This project demonstrates a simple FastAPI application that connects to a MongoDB database and implements CRUD (Create, Read, Update, Delete) operations for a "Todo" model.
## Tech Stack
- FastAPI (Web Framework)
- Pydantic (Data Validation)
- MongoDB (Database)
- pymongo (MongoDB Driver)## Running Project
1. Install dependecies
```bash
pip install -r requirements.txt
```
2. Set up MongoDB connection:
- Configure the MongoDB connection details in `src/config/connection_db.py`.3. Start Application
```bash
fastapi dev app/main.py
```
## Running Test
1. Run All Test
```bash
pytest -v -s
```
2. Run Specific Scenario
```bash
pytest -v -s tests/test_todo.py::
```