Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devlopersabbir/fast-crud-api
CRUD REST API with FastApi
https://github.com/devlopersabbir/fast-crud-api
api crud fast fastapi python rest
Last synced: 4 days ago
JSON representation
CRUD REST API with FastApi
- Host: GitHub
- URL: https://github.com/devlopersabbir/fast-crud-api
- Owner: devlopersabbir
- Created: 2023-10-07T06:29:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-11T17:42:57.000Z (about 1 year ago)
- Last Synced: 2023-10-12T18:25:16.246Z (about 1 year ago)
- Topics: api, crud, fast, fastapi, python, rest
- Language: Python
- Homepage: https://fastapi.tiangolo.com/
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Python FastAPI
Simple my learning documentation
#### **Step 1**: import `FastAPI`
```python
from fastapi import FastAPI
````FastAPI` is a Python class that provides all the functionality for your API.
#### **Step 2**: Create a `FastAPI` "instance"
```python
app = FastAPI()
```- Here the app variable will be an "instance" of the class `FastAPI`
- app varibale will help us to perform routing, controlling everything as like
the `express`
- This will be the main point of interaction to create all your API.
- And this `app` variable will help me to run our `uvicorn` application**Summary of `main.py` file**
- Import FastAPI.
- Create an app instance.
- Write a path operation decorator (like `@app.get("/")`).
- Write a path operation function (like def root(): ... above).
- Run the development server (like `uvicorn main:app --reload`).