Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbrsagor/fastapicrud
Fast API CRUD backend web application
https://github.com/mbrsagor/fastapicrud
api-rest fastapi microservices python3 rest
Last synced: 14 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T15:34:22.000Z (10 months ago)
- Last Synced: 2024-10-08T13:31:49.068Z (about 1 month ago)
- Topics: api-rest, fastapi, microservices, python3, rest
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- 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 Unionfrom 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/)