17 lines
332 B
Python
17 lines
332 B
Python
from fastapi import FastAPI
|
|
import tomllib
|
|
|
|
from .routers import ip
|
|
|
|
def get_version_from_pyproject():
|
|
with open("pyproject.toml", "rb") as f:
|
|
data = tomllib.load(f)
|
|
return data["project"]["version"]
|
|
|
|
|
|
app = FastAPI(
|
|
title='uVPN Backend',
|
|
version=get_version_from_pyproject()
|
|
)
|
|
|
|
app.include_router(ip.router) |