Skip to content

Instantly share code, notes, and snippets.

@espeed
Last active May 28, 2016 01:55
Show Gist options
  • Save espeed/3938820 to your computer and use it in GitHub Desktop.
Save espeed/3938820 to your computer and use it in GitHub Desktop.
Bulbs/Titan Example
# by James Thornton, http://jamesthornton.com
from bulbs.titan import Graph, DEBUG
# TITAN_URI => "http://localhost:8182/graphs/graph"
# "graph" is the default graph name set in the Titan Server config
g = Graph()
g.config.set_logger(DEBUG)
g.vertices.index.create_key("city")
g.vertices.create(name="James", city="Dallas")
print "KEYS: ", g.vertices.index.keys()
print "DATA: ", g.vertices.index.lookup(city="Dallas").next().data()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment