neo4j图形数据库的对象映射器。

cythereal-neomodel的Python项目详细描述


neomodel

注:这是NeoModel的定制版本,供个人使用。使用 official version取而代之。

一个用于neo4j图形数据库的对象图映射器(ogm),构建在令人敬畏的neo4j_driver

  • 熟悉的django模型样式定义。
  • 强大的查询api。
  • 通过基数限制强制您的架构。
  • 完全事务支持。
  • 线程安全。
  • 保存前/保存后/删除挂钩。
  • 通过django_neomodel
  • 实现Django集成
https://secure.travis-ci.org/robinedwards/neomodel.pngDocumentation Status

文档

readthedocs上提供。

要求

  • Python2.7,3.4+
  • Neo4J 3.0、3.1、3.2、3.3

安装

从PYPI安装(推荐):

$ pip install neomodel

从github安装:

$ pip install git+git://github.com/robinedwards/neomodel.git@HEAD#egg=neomodel-dev

将2.x升级到3.x

  • Now utilises neo4j_driver as the backend which uses bolt so neo4j 3 is required
  • Connection now set through config.DATABASE_URL (see getting started docs)
  • The deprecated category() method on StructuredNode has been removed
  • The deprecated index property on StructuredNode has been removed
  • The streaming=True flag is now irrelevant with bolt and produces a deprecation warning
  • Batch operations must now be wrapped in a transaction in order to be atomic
  • Indexing NodeSets returns a single node now as opposed to a list

贡献

想法,错误,测试和拉请求总是受欢迎的。

运行测试套件

确保安装了新的virtualenv和nose:

$ pip install nose

也可以使用Neo4J数据库版本3或更高版本来运行测试。(它将在每次测试运行时擦除此数据库):

$ export NEO4J_BOLT_URL=bolt://neo4j:neo4j@localhost:7687 # (the default)

设置虚拟环境,安装NeoModel进行开发并运行测试套件:

$ virtualenv venv
$ source venv/bin/activate
$ python setup.py develop
$ nosetests -s

如果您第一次运行neo4j数据库,测试套件会将密码设置为“test”。

如果安装了docker-compose,则可以对所有受支持的python运行测试套件 口译员和NEO4J版本:

# in the project's root folder:
$ ./tests-with-docker-compose.sh
Join the chat at https://gitter.im/robinedwards/neomodel

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
与ReentrantLock相比,java ReentrantReadWriteLock的性能非常差   java如何使用Maven Android Studio正确导入?   安卓将ADB添加到我的Java PC应用程序   反射Java getDeclaredConstructor失败,来自JUnit的NoSuchMethodException   JSP上siteedit标记库的java替代   JavaSpring环境概要文件和JPA   java中是否有一个类似于StringBuilder的类,唯一的区别是它具有固定的长度?   JavaMathContext。小数点32 vs MathContext。小数点64,使用哪一个,为什么?   java使用spring在Ibm Websphere MQ中实现重试逻辑   java调用SpriteBatch。开始()和结束()   java有一种从文本中读取文本的方法。文件,并将其设置为pom中的maven属性。xml专家?   java让sitemesh使用struts2   Java Swing:在现有窗口上定位对话框   使用带有MemSql的JPA本机查询的java Select json列