What's the best way to access Neo4j from Django?

后端 未结 1 1020
北海茫月
北海茫月 2021-02-15 15:14

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

  • http://pypi.python.org/pypi/neo4j-embedded
相关标签:
1条回答
  • 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!

    0 讨论(0)
提交回复
热议问题