Neo4j推出基于Python的嵌入式图数据存储
Neo4j很早就在说,会推出一个嵌入在Python中的图数据库模块,让Python可以通过图数据库的API操作本地文件以存储图结构的数据(类似于很多支持SQLite的类库)。而今天Neo4j终于在官方博客上兑现了其承诺,并为自己的多次跳票表示抱歉。
First of all, we’re really sorry. We have been saying that Python support for the embedded database is coming in “a few weeks” or “next month” for over half a year now, and so far, you have waited patiently, and you have waited in vain.
先看一下使用方法
#import相应的包 from neo4j import GraphDatabase #创建基于本地文件的图数据库 db = GraphDatabase('/my/db/location') #存储数据 with db.transaction: oscar = db.node(name=’Oscar Wilde’) jacob = db.node(name=’Jacob’) # Create a relationship oscar.impressed_by_blogging_skills_of(jacob) #关闭数据库 db.shutdown()
目前最新版本在CPython2.7.2 Windows和Linux下都经过测试,在Python2.6版本下也可以正常工作。你需要安装JPype以在Python和Java间建立桥梁。更多详细介绍及使用说明见neo4j的官方文档:docs.neo4j.org
相关推荐
憧憬 2020-08-21
wa2003 2020-06-17
悟空大师 2020-06-06
辛佳雨 2020-06-02
fangxiaoji 2020-05-12
loviezhang 2020-04-17
Charlesbases 2020-04-16
whyname 2020-03-07
wzhwangzhuohui 2020-03-04
flyDeDog 2020-02-25
qijiqiguai 2020-02-13
zxznsjdsj 2020-02-02
chenjinlong 2020-01-31
大脸猫脸大 2020-01-26
wintershii 2020-01-18
东哥笔记 2020-01-17