从 Django 访问 Neo4j 的最佳方式是什么? [英] What's the best way to access Neo4j from Django?

查看:12
本文介绍了从 Django 访问 Neo4j 的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎我发现了一些让我感到困惑的东西;我找到了两个 Neo4j 下载到 python,第一个是:

it seems that i found something that let me confused; i've found two Neo4j to download to python, the first one is:

第二个是:

两者有什么区别?第一个似乎很大(大小),所以这是否意味着如果我使用它我就不需要 Neo4j 社区版本(里程碑)?

what's the difference between the two? the first one seems to be big (size), so does this mean that if i use it i'll not need the neo4j community release (milestone)?

当我安装第一个并尝试测试 django 示例时,似乎名为model"的目录 https://svn.neo4j.org/components/neo4j.py/trunk/src/main/python/neo4j/model/ 不见了?那么有什么区别,谁会更好地与 Django 一起使用?

when i've installed the first one, and tried to test a django example, it seems that the directory named "model" https://svn.neo4j.org/components/neo4j.py/trunk/src/main/python/neo4j/model/ is missing? so what's the difference, and who will be better to use with Django?

那个呢?

推荐答案

我是开始更新 neo4django 来自 Tobias 的原始集成,但我会尽量公平 =)

I'm part of the team that began updating neo4django from Tobias's original integration, but I'll try to be fair =)

您跳过了另一个重要的库 - neo4j-rest-client,Python REST捆绑.neo4django 基于这个库,并分享了它的一系列优点和缺点.特别是,REST 客户端总是比本地客户端慢,但它允许轻松使用远程数据库.

You skipped another important library- neo4j-rest-client, the Python REST binding. neo4django is based on this library, and shares a bunch of its advantages and disadvantages. In particular, a REST client will always be slower than a native client, but it allows the easy use of a remote database.

neo4django 与 Django 的集成非常紧密.它与标准 ORM 非常相似,并且有一些很酷的东西,比如具有索引支持并与关系数据库一起工作的查询.我非常喜欢它,但是如果您不使用远程数据库,则性能损失可能太高了.不过,我正在努力,所以继续发布

neo4django is a pretty tight integration with Django. It's very similar to the standard ORM, and has some cool goodies like queries with index support and working alongside a relational DB. I like it alot, but if you aren't using a remote database, the performance penalty might be too high. I'm working on it, though, so keep posted!

我相信上面的 svn 链接(https://svn.neo4j.org/components/neo4j.py/trunk/) 是旧的原生 Python 绑定.新的比我看到的要好得多(不那么令人头疼,更新了),所以除非你想尝试一下旧的捆绑 Django 集成,否则更容易避免它.

I believe the svn link above (https://svn.neo4j.org/components/neo4j.py/trunk/) is the old native Python binding. The new one is way better from what I've seen (less of a headache, updated), so unless you want to give the old bundled Django integration a try, it'd be easier to avoid it.

第一个链接(http://pypi.python.org/pypi/neo4j-embedded) 是较新的集成.我认为发行版中不包含模型",因为它尚未与 Django 集成一起提供.如果您需要严格的性能并且您可以放弃 Django 风格的数据定义语言,那么这就是您要走的路.

The first link (http://pypi.python.org/pypi/neo4j-embedded) is the newer integration. I don't think 'model' is included in the distro, because it doesn't yet come with Django integration. If you need serious performance and you're okay with dropping the Django-style data-definition-language, it's the way to go.

在未来,我希望让 neo4django 与原生和 REST 客户端一起工作......我们会看到会发生什么!

In the future, I hope to get neo4django working with the native and REST clients... we'll see what happens!

这篇关于从 Django 访问 Neo4j 的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆