Last active
May 28, 2016 01:55
-
-
Save espeed/3938820 to your computer and use it in GitHub Desktop.
Bulbs/Titan Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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