Python client library and toolkit for Neo4j
Project description
** Please now consider this project to be EOL. There will be no more updates. It is recommended to use the official Neo4j drivers instead. **
The version history of py2neo on PyPI got lost. If you need an older version, you can install [py2neo-history](https://pypi.org/project/py2neo-history/) instead.
Py2neo is a client library and toolkit for working with Neo4j from within Python applications. The library supports both Bolt and HTTP and provides a high level API, an OGM, admin tools, a Cypher lexer for Pygments, and many other bells and whistles.
Command line tooling has been removed from the library in py2neo 2021.2. This functionality now exists in the separate ipy2neo project.
As of version 2021.1, py2neo contains full support for routing, as exposed by a Neo4j cluster. This can be enabled using a neo4j://... URI or by passing routing=True to a Graph constructor.
Installation & Compatibility
To install the latest release of py2neo, simply use:
$ pip install py2neo
The following versions of Python and Neo4j (all editions) are supported:
Neo4j |
Python 3.5+ |
Python 2.7 |
---|---|---|
4.4 |
||
4.3 |
||
4.2 |
||
4.1 |
||
4.0 |
||
3.5 |
||
3.4 |
Note that py2neo is developed and tested under Linux using standard CPython distributions. While other operating systems and Python distributions may work, support for these is not available.
Quick Example
To run a query against a local database is straightforward:
>>> from py2neo import Graph >>> graph = Graph("bolt://localhost:7687", auth=("neo4j", "password")) >>> graph.run("UNWIND range(1, 3) AS n RETURN n, n * n as n_sq") n | n_sq -----|------ 1 | 1 2 | 4 3 | 9
Releases & Versioning
As of 2020, py2neo has switched to Calendar Versioning, using a scheme of YYYY.N.M. Here, N is an incrementing zero-based number for each year, and M is a revision within that version (also zero-based).
No compatibility guarantees are given between versions, but as a general rule, a change in M should require little-to-no work within client applications, whereas a change in N may require some work. A change to the year is likely to require a more significant amount of work to upgrade.
Note that py2neo is developed on a rolling basis, so patches are not made to old versions. Users will instead need to install the latest release to adopt bug fixes.
More
For more information, read the handbook.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py2neo-2021.2.4.tar.gz
.
File metadata
- Download URL: py2neo-2021.2.4.tar.gz
- Upload date:
- Size: 159.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b2737fcd9fd8d82b57e856de4eda005281c9cf0741c989e5252678f0503f77e |
|
MD5 | 6842bd819484e56b2fedbfd31bd32e3e |
|
BLAKE2b-256 | 96bbfd298b06181fc4aace4838d91e6b511184ad1f3e5fe9cffee7878c66f14a |
File details
Details for the file py2neo-2021.2.4-py2.py3-none-any.whl
.
File metadata
- Download URL: py2neo-2021.2.4-py2.py3-none-any.whl
- Upload date:
- Size: 177.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ddbe818354a6fa16d47dfd0fe5cb0287fa42ff109e87aa7b3e43636060d85a1 |
|
MD5 | 1835c36bc82d92a13294830df67d0385 |
|
BLAKE2b-256 | b6e5d97c8adbda3b9a6957c572f05a8427661194832d4709b90c108b7e868268 |