Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Bulbs 0.3 Neo4j Server Example
# Bulbs 0.3 Neo4j Server Example
# by James Thornton (
from bulbs.neo4jserver import Graph
from bulbs.model import Node, Relationship
from import String, Integer, DateTime
from bulbs.utils import current_datetime
class Person(Node):
element_type = "person"
name = String(nullable=False)
age = Integer()
class Knows(Relationship):
label = "knows"
timestamp = DateTime(default=current_datetime, nullable=False)
g = Graph()
g.add_proxy("people", Person)
g.add_proxy("knows", Knows)
james = g.people.create(name="James",age=34)
julie = g.people.create(name="Julie")
knows = g.knows.create(james,julie)
print type(james), james.eid, james.element_type,, james.age = "James Thornton" = "Dallas"
james2 = g.people.get(james.eid)
friends = james.outV('knows')
print list(friends)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.