Skip to content

Instantly share code, notes, and snippets.

View IanSaucy's full-sized avatar

Ian IanSaucy

  • Boston, MA
View GitHub Profile
@IanSaucy
IanSaucy / celery_models.py
Created August 18, 2020 21:20
Python Celery Results Backend SQLAlchemy Postgres Models
# These models match the tables generated by Celery if you use Postgres results backend
# If you are using a tool such as alembic then using these models will get your 'python' code models
# to align with those that are in your DB(created by Celery).
# These where generated using the amazing sqlacodegen tool
# https://pypi.org/project/sqlacodegen/
from sqlalchemy import Column, Integer, String, \
LargeBinary, DateTime, Text