从 Django 访问 Neo4j 的最佳方式是什么?

发布于 2024-12-09 07:33:24 字数 834 浏览 1 评论 0原文

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

第二个是:

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

当我安装第一个并尝试测试 django 示例时,似乎名为“model”的目录 https://svn.neo4j.org/components/neo4j.py/trunk/src/main/python/neo4j/model/ 丢失?那么有什么区别,谁更适合与 Django 一起使用呢?

那那个呢?

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

and the second one is:

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)?

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?

and what about that one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁〃客ぐ 2024-12-16 07:33:24

我是开始从 Tobias 的原始集成更新 neo4django 的团队的一员,但我会尝试公平 =)

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

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

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

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

将来,我希望 Neo4django 能够与本机和 REST 客户端一起工作......我们将看看会发生什么!

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

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 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!

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.

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.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文