https://github.com/mbrsagor/fastAPICRUD
Fast API CRUD backend web application
https://github.com/mbrsagor/fastAPICRUD
api-rest fastapi microservices python3 rest
Last synced: 11 months ago
JSON representation
Fast API CRUD backend web application
- Host: GitHub
- URL: https://github.com/mbrsagor/fastAPICRUD
- Owner: mbrsagor
- Created: 2019-05-07T08:10:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T15:34:22.000Z (over 2 years ago)
- Last Synced: 2025-07-01T14:16:13.754Z (12 months ago)
- Topics: api-rest, fastapi, microservices, python3, rest
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastAPICRUD
> Fast API CRUD backend web application.
### Setup:
If you want to run the project in your local development server please follow the instruction.
###### Open your terminal:
- python 3.10
- sqlalchemy
```bash
git clone https://github.com/mbrsagor/fastAPICRUD.git
cd fastAPICRUD
virtualenv venv --python=python3.10
source venv/bin/activate
pip install -r requirements.txt
uvicorn src.main:app --host localhost --port 8000 --reload
```
#### Run docker::
```bash
docker-compose up -d
```
###### An ORM for Python::
```bash
pip install SQLAlchemy fastapi-utils
```
```python
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
return {"item_id": item_id, "q": q}
```
### Source:
[Here is the blog, which I got from it.](https://codevoweb.com/build-a-crud-app-with-fastapi-and-sqlalchemy/)