mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
19 lines
366 B
Python
19 lines
366 B
Python
from fastapi import FastAPI
|
|
from app.routers import bitcoin, system
|
|
|
|
|
|
# start server with "uvicorn main:app --reload"
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(bitcoin.router)
|
|
app.include_router(system.router)
|
|
|
|
|
|
# @app - path operation decorator
|
|
# .get - path operation
|
|
# '/' - the path
|
|
@app.get('/')
|
|
def index():
|
|
# path operation function
|
|
return {'data': '123'}
|