rexster的python客户机,遵循blueprints属性图模型接口
python-rexster的Python项目详细描述
synopsis: | Implements a client over Rexster (https://github.com/tinkerpop/rexster/) providing the Python developer an easy way to interact with the databases supported. |
---|
该层遵循pyblueprints图形模型接口,允许程序员以相同的方式工作,无论使用的是哪个底层图形数据库。
安装
在您的virtualenv中安装python rexster的最简单方法是:
pip install python-rexster
用法
连接到Rexster实例
>>> from rexster import RexsterServer, RexsterGraph >>> #Connecting to server >>> HOST = 'http://localhost:8182' >>> server = RexsterServer(HOST) >>> #List graphs availbale in server >>> server.graphs() [u'tinkergraph', u'gratefulgraph', u'tinkergraph-readonly', u'sailgraph', u'emptygraph'] >>> #Connecting to a given graph >>> graph = RexsterIndexableGraph(server, 'tinkergraph')
更改日志
0.1.1(2011-07-12)
- 添加了返回none而不是引发异常(更像是pythonic方式)
- 更新测试
0.1(2011-07-6)
初始版本