Initial Commit + FastApi server structure

This commit is contained in:
shadowik 2024-09-24 13:45:23 +04:00
parent 79147c2d43
commit 7dc9d18ccd
5 changed files with 74 additions and 0 deletions

1
front/README.md Normal file
View File

@ -0,0 +1 @@
# Evaluation Efficiency Optimization Wind Front

27
server/README.md Normal file
View File

@ -0,0 +1,27 @@
# Evaluation Efficiency Optimization Wind Server
## Requirements
1) Python 3.12
## Getting Started
1. Create virtual environment
```zsh
python3 -m venv .venv
```
2. Source virtual environment
```zsh
source .venv/bin/activate
```
3. Install dependencies
```zsh
pip install -r requirements.txt
```
4. Start FastAPI process
```zsh
fastapi dev main.py
```

13
server/main.py Normal file
View File

@ -0,0 +1,13 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}

33
server/requirements.txt Normal file
View File

@ -0,0 +1,33 @@
annotated-types==0.7.0
anyio==4.6.0
certifi==2024.8.30
click==8.1.7
dnspython==2.6.1
email_validator==2.2.0
fastapi==0.115.0
fastapi-cli==0.0.5
h11==0.14.0
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.2
idna==3.10
Jinja2==3.1.4
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
pydantic==2.9.2
pydantic_core==2.23.4
Pygments==2.18.0
python-dotenv==1.0.1
python-multipart==0.0.10
PyYAML==6.0.2
rich==13.8.1
shellingham==1.5.4
sniffio==1.3.1
starlette==0.38.6
typer==0.12.5
typing_extensions==4.12.2
uvicorn==0.30.6
uvloop==0.20.0
watchfiles==0.24.0
websockets==13.1

0
server/src/router.py Normal file
View File