Skip to content

Instantly share code, notes, and snippets.

View nstephane's full-sized avatar
😎

Dishma237 nstephane

😎
  • Johannesburg, South Africa
View GitHub Profile
@wshayes
wshayes / poetry_dockerfile
Last active October 29, 2024 19:53
Poetry docker file that can support private git repository packages
# 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 \
@Guest007
Guest007 / make_crud.py
Created December 23, 2019 18:26 — forked from Bobronium/make_crud.py
FastAPI CRUD fabric to reduce amount of boilerplate code
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