Fix build application from terminal
This commit is contained in:
parent
4f659b1149
commit
e29917fbca
@ -20,8 +20,13 @@
|
|||||||
```zsh
|
```zsh
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Start FastAPI process
|
4. Enter src directory
|
||||||
```zsh
|
```zsh
|
||||||
fastapi dev main.py
|
cd src
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start FastAPI process
|
||||||
|
```zsh
|
||||||
|
uvicorn main:app --reload
|
||||||
```
|
```
|
@ -1,8 +1,8 @@
|
|||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
|
|
||||||
from .database import session_maker
|
from data.database import session_maker
|
||||||
from .models import Weather
|
from data.models import Weather
|
||||||
from .schemas import SWeatherInfo
|
from data.schemas import SWeatherInfo
|
||||||
|
|
||||||
|
|
||||||
class WeatherRepository:
|
class WeatherRepository:
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
@ -8,9 +9,11 @@ from fastapi.responses import FileResponse
|
|||||||
from data.repository import WeatherRepository
|
from data.repository import WeatherRepository
|
||||||
from data.schemas import SFlorisInputParams, SFlorisOutputData, SWeatherInfo
|
from data.schemas import SFlorisInputParams, SFlorisOutputData, SWeatherInfo
|
||||||
|
|
||||||
from FlorisULSTU import FlorisULSTU
|
|
||||||
|
|
||||||
FLORIS_IMAGES_PATH = Path("public/floris")
|
sys.path.append(str(Path(__file__).parent.parent.parent))
|
||||||
|
from floris_module.src import FlorisULSTU
|
||||||
|
|
||||||
|
FLORIS_IMAGES_PATH = Path(__file__).parent.parent.parent / "public" / "floris"
|
||||||
|
|
||||||
router = APIRouter(
|
router = APIRouter(
|
||||||
prefix="/api/floris",
|
prefix="/api/floris",
|
||||||
|
Loading…
Reference in New Issue
Block a user