Start using fastapi.
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
from dakiny_bot import app
|
||||||
|
|
||||||
|
|
||||||
|
@app.post("/message/")
|
||||||
|
async def hello():
|
||||||
|
print("we did a webhook")
|
||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
import hydra
|
import hydra
|
||||||
import nextcord
|
import nextcord
|
||||||
|
from fastapi import FastAPI
|
||||||
from hydra.core.config_store import ConfigStore
|
from hydra.core.config_store import ConfigStore
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
|
||||||
@@ -27,6 +28,8 @@ handler.setFormatter(
|
|||||||
)
|
)
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
|
|
||||||
|
app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
@hydra.main(config_path="conf", config_name="config")
|
@hydra.main(config_path="conf", config_name="config")
|
||||||
def main(cfg: DakinyConfig):
|
def main(cfg: DakinyConfig):
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ pytz==2022.7.1
|
|||||||
hydra-core==1.3.2
|
hydra-core==1.3.2
|
||||||
sqlalchemy<2.0
|
sqlalchemy<2.0
|
||||||
pandas==1.5.2
|
pandas==1.5.2
|
||||||
|
fastapi==0.111.0
|
||||||
Reference in New Issue
Block a user