This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:experimental | |
FROM python:3.7-slim AS base | |
# ENV LANG=C.UTF-8 # Sets utf-8 encoding for Python et al | |
# ENV PYTHONDONTWRITEBYTECODE=1 # Turns off writing .pyc files; superfluous on an ephemeral container. | |
# ENV PYTHONUNBUFFERED=1 # Seems to speed things up | |
ENV PYTHONUNBUFFERED=1 \ | |
PYTHONDONTWRITEBYTECODE=1 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
from functools import partial | |
from typing import Type, Literal, Callable, Dict, TypeVar, List, Generic | |
from fastapi import APIRouter, Depends | |
from pydantic.generics import GenericModel | |
# import your database base model here | |
# from db_model import BaseDBModel | |