Skip to content

Instantly share code, notes, and snippets.

View rkuykendall's full-sized avatar

Robert Kuykendall rkuykendall

View GitHub Profile
@rkuykendall
rkuykendall / undirected_graph.py
Created May 9, 2014 00:09
Undirected Graph: Many-to-Many, Reflexive, Non-Directional Relationships in SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('sqlite://', echo=False)
session = sessionmaker(engine)()
Base = declarative_base()
"""An undirected graph example Modified from SQLAlchemy directed
graph example."""