Skip to content

Instantly share code, notes, and snippets.

View jakebrinkmann's full-sized avatar

Jake Brinkmann jakebrinkmann

View GitHub Profile
@jakebrinkmann
jakebrinkmann / sqla-guid-array.py
Last active November 3, 2020 17:40 — forked from mvantellingen/sqla-guid-array.py
SQLAlchemy INET Array
import datetime
import uuid
import psycopg2.extras
from sqlalchemy import Column, MetaData, Table
from sqlalchemy.types import Integer, DateTime, TypeDecorator
from sqlalchemy.dialects.postgresql import ARRAY, array
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.sql.expression import cast, literal, select
@jakebrinkmann
jakebrinkmann / immutable_json.py
Created January 13, 2020 19:47 — forked from je55ek/immutable_json.py
Function to create an immutable data structure and its associated marshmallow schema in one fell swoop
from collections import namedtuple
from marshmallow import Schema
from marshmallow.decorators import post_load
def class_and_schema(class_name, fields):
"""Create a class and its marshmallow schema.
Example::
@jakebrinkmann
jakebrinkmann / .gitattributes
Last active February 21, 2020 16:54 — forked from Lordnibbler/pull-request-template.md
Sample Pull Request Template (⚡VIEW RAW FOR HIDDEN COMMENTS⚡)
/CHANGELOG merge=union