Skip to content

Instantly share code, notes, and snippets.

View gdbassett's full-sized avatar

Gabe gdbassett

  • Liberty Mutual
  • US
View GitHub Profile
@drewww
drewww / client.py
Created November 28, 2011 21:48
Connect to socket.io server from python, using websocket
#!/usr/bin/env python
# encoding: utf-8
"""
client.py
Based heavily on:
- https://github.com/mtah/python-websocket/blob/master/examples/echo.py
- http://stackoverflow.com/a/7586302/316044
Created by Drew Harry on 2011-11-28.
import neo4django
from neo4django.db import models
class Preceding(models.NodeModel):
precedes_events = models.Relationship('Event', rel_type=neo4django.Outgoing.PRECEDES_EVENT,
related_name='preceded_by')
precedes_conditions = models.Relationship('Condition', rel_type=neo4django.Outgoing.PRECEDES_CONDITION,
related_name='preceded_by')
class Event(Preceding):