start working with api
This commit is contained in:
parent
1f8815fc5d
commit
9462dd4465
2
.gitignore
vendored
2
.gitignore
vendored
@ -99,7 +99,7 @@ ipython_config.py
|
||||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
#uv.lock
|
||||
*.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
|
1
api/.python-version
Normal file
1
api/.python-version
Normal file
@ -0,0 +1 @@
|
||||
3.12.5
|
3
api/README.md
Normal file
3
api/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# api
|
||||
|
||||
Describe your project here.
|
26
api/pyproject.toml
Normal file
26
api/pyproject.toml
Normal file
@ -0,0 +1,26 @@
|
||||
[project]
|
||||
name = "api"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
authors = [
|
||||
{ name = "matv864", email = "matv864@gmail.com" }
|
||||
]
|
||||
dependencies = [
|
||||
"fastapi[standard]>=0.115.7",
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.12"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = []
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/api"]
|
19
api/src/app.py
Normal file
19
api/src/app.py
Normal file
@ -0,0 +1,19 @@
|
||||
from fastapi import APIRouter, FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app = FastAPI(
|
||||
title="hatiko-api",
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
main_app_router = APIRouter(prefix="/api")
|
||||
|
||||
app.include_router(main_app_router)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user