Skip to content

Instantly share code, notes, and snippets.

@sector119
sector119 / app.py
Last active November 30, 2022 18:27
FastAPI + Async SQLAlchemy
from fastapi import Depends, FastAPI
from .dependencies import get_service
from .schemas import DataResponseSchema
from .services import DataService
app = FastAPI()
@app.get("/data", response_model=DataResponseSchema)
@sector119
sector119 / config.py
Created February 20, 2024 13:01
taskiq cron scheduling with structlog and sentry middlewares
import os
from pydantic import AmqpDsn
from pydantic import BaseSettings
from pydantic import HttpUrl
from pydantic import PostgresDsn
from pydantic import RedisDsn
from . import VERSION