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

时间:2021-08-07 23:31:19

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

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

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

这两者有什么区别?第一个看起来很大(大小),所以这是否意味着如果我使用它我不需要neo4j社区发布(里程碑)?

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?

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

and what about that one?

那那个呢?

1 个解决方案

#1


10  

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

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

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.

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

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!

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

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.

我相信上面的svn链接(https://svn.neo4j.org/components/neo4j.py/trunk/)是旧的本机Python绑定。新的一个比我看到的更好(更少头疼,更新),所以除非你想尝试旧的捆绑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.

第一个链接(http://pypi.python.org/pypi/neo4j-embedded)是较新的集成。我不认为发行版中包含“模型”,因为它还没有与Django集成。如果你需要认真的表现并且你可以放弃Django风格的数据定义语言,那就是你要走的路。

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

在未来,我希望让neo4django与本机和REST客户合作...我们会看到会发生什么!

#1


10  

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

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

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.

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

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!

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

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.

我相信上面的svn链接(https://svn.neo4j.org/components/neo4j.py/trunk/)是旧的本机Python绑定。新的一个比我看到的更好(更少头疼,更新),所以除非你想尝试旧的捆绑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.

第一个链接(http://pypi.python.org/pypi/neo4j-embedded)是较新的集成。我不认为发行版中包含“模型”,因为它还没有与Django集成。如果你需要认真的表现并且你可以放弃Django风格的数据定义语言,那就是你要走的路。

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

在未来,我希望让neo4django与本机和REST客户合作...我们会看到会发生什么!