https://github.com/furkankayam/basic-fastapi
✅ Basic FastAPI Example
https://github.com/furkankayam/basic-fastapi
fastapi python
Last synced: 5 months ago
JSON representation
✅ Basic FastAPI Example
- Host: GitHub
- URL: https://github.com/furkankayam/basic-fastapi
- Owner: furkankayam
- Created: 2025-01-09T13:41:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-02T03:45:36.000Z (over 1 year ago)
- Last Synced: 2025-04-08T08:52:52.601Z (about 1 year ago)
- Topics: fastapi, python
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
## ⚡FastAPI⚡
- `python -m venv venv`
- `venv\Scripts\active`
---
1. `pip install fastapi[all]`
2. create `main.py`
3. create `__init__.py`
4. main.py
```py
from fastapi import FastAPI
app = FastAPI()
@app.get('/')
async def welcome():
return {'message': 'Hello World'}
```
5. `uvicorn main:app --reload` || `uvicorn main:app --reload --host 0.0.0.0 --port 8080`
---
- `pydantic` kullanılabilir
---
- Ubuntu ortamı için python sanal ortam kurma
1. `sudo apt install python3-venv`
2. `python3 -m venv venv`
3. `source venv/bin/active`