neo4j-driver


Nameneo4j-driver JSON
Version 5.26.0 PyPI version JSON
download
home_pageNone
SummaryNeo4j Bolt driver for Python
upload_time2024-11-01 13:15:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseApache License, Version 2.0
keywords neo4j graph database
VCS
bugtrack_url
requirements pytz
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. warning::

    This package is deprecated and will stop receiving updates starting with
    version 6.0.0. Please install ``neo4j`` instead (which is an alias, i.e.,
    a drop-in replacement). See https://pypi.org/project/neo4j/ .

****************************
Neo4j Bolt Driver for Python
****************************

This repository contains the official Neo4j driver for Python.

Starting with 5.0, the Neo4j Drivers will be moving to a monthly release
cadence. A minor version will be released on the last Friday of each month so
as to maintain versioning consistency with the core product (Neo4j DBMS) which
has also moved to a monthly cadence.

As a policy, patch versions will not be released except on rare occasions. Bug
fixes and updates will go into the latest minor version and users should
upgrade to that. Driver upgrades within a major version will never contain
breaking API changes.

See also: https://neo4j.com/developer/kb/neo4j-supported-versions/

+ Python 3.13 supported (since driver version 5.26.0).
+ Python 3.12 supported (since driver version 5.14.0).
+ Python 3.11 supported (since driver version 5.3.0).
+ Python 3.10 supported.
+ Python 3.9 supported.
+ Python 3.8 supported.
+ Python 3.7 supported.


Installation
============

To install the latest stable version, use:

.. code:: bash

    pip install neo4j


.. TODO: 7.0 - remove this note

.. note::

    ``neo4j-driver`` is the old name for this package. It is now deprecated and
    and will receive no further updates starting with 6.0.0. Make sure to
    install ``neo4j`` as shown above.


Alternative Installation for Better Performance
-----------------------------------------------

You may want to have a look at the available Rust extensions for this driver
for better performance. The Rust extensions are not installed by default. For
more information, see `neo4j-rust-ext`_.

.. _neo4j-rust-ext: https://github.com/neo4j/neo4j-python-driver-rust-ext


Quick Example
=============

.. code-block:: python

    from neo4j import GraphDatabase, RoutingControl


    URI = "neo4j://localhost:7687"
    AUTH = ("neo4j", "password")


    def add_friend(driver, name, friend_name):
        driver.execute_query(
            "MERGE (a:Person {name: $name}) "
            "MERGE (friend:Person {name: $friend_name}) "
            "MERGE (a)-[:KNOWS]->(friend)",
            name=name, friend_name=friend_name, database_="neo4j",
        )


    def print_friends(driver, name):
        records, _, _ = driver.execute_query(
            "MATCH (a:Person)-[:KNOWS]->(friend) WHERE a.name = $name "
            "RETURN friend.name ORDER BY friend.name",
            name=name, database_="neo4j", routing_=RoutingControl.READ,
        )
        for record in records:
            print(record["friend.name"])


    with GraphDatabase.driver(URI, auth=AUTH) as driver:
        add_friend(driver, "Arthur", "Guinevere")
        add_friend(driver, "Arthur", "Lancelot")
        add_friend(driver, "Arthur", "Merlin")
        print_friends(driver, "Arthur")


Further Information
===================

* `The Neo4j Operations Manual`_ (docs on how to run a Neo4j server)
* `The Neo4j Python Driver Manual`_ (good introduction to this driver)
* `Python Driver API Documentation`_ (full API documentation for this driver)
* `Neo4j Cypher Cheat Sheet`_ (summary of Cypher syntax - Neo4j's graph query language)
* `Example Project`_ (small web application using this driver)
* `GraphAcademy`_ (interactive, free online trainings for Neo4j)
* `Driver Wiki`_ (includes change logs)
* `Neo4j Migration Guide`_

.. _`The Neo4j Operations Manual`: https://neo4j.com/docs/operations-manual/current/
.. _`The Neo4j Python Driver Manual`: https://neo4j.com/docs/python-manual/current/
.. _`Python Driver API Documentation`: https://neo4j.com/docs/api/python-driver/current/
.. _`Neo4j Cypher Cheat Sheet`: https://neo4j.com/docs/cypher-cheat-sheet/
.. _`Example Project`: https://github.com/neo4j-examples/movies-python-bolt
.. _`GraphAcademy`: https://graphacademy.neo4j.com/categories/python/
.. _`Driver Wiki`: https://github.com/neo4j/neo4j-python-driver/wiki
.. _`Neo4j Migration Guide`: https://neo4j.com/docs/migration-guide/current/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "neo4j-driver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "neo4j, graph, database",
    "author": null,
    "author_email": "\"Neo4j, Inc.\" <drivers@neo4j.com>",
    "download_url": "https://files.pythonhosted.org/packages/4a/9f/5f18f25676e66d386490b490d710719cc695853cee5f143b68755ba3a7e5/neo4j-driver-5.26.0.tar.gz",
    "platform": null,
    "description": ".. warning::\n\n    This package is deprecated and will stop receiving updates starting with\n    version 6.0.0. Please install ``neo4j`` instead (which is an alias, i.e.,\n    a drop-in replacement). See https://pypi.org/project/neo4j/ .\n\n****************************\nNeo4j Bolt Driver for Python\n****************************\n\nThis repository contains the official Neo4j driver for Python.\n\nStarting with 5.0, the Neo4j Drivers will be moving to a monthly release\ncadence. A minor version will be released on the last Friday of each month so\nas to maintain versioning consistency with the core product (Neo4j DBMS) which\nhas also moved to a monthly cadence.\n\nAs a policy, patch versions will not be released except on rare occasions. Bug\nfixes and updates will go into the latest minor version and users should\nupgrade to that. Driver upgrades within a major version will never contain\nbreaking API changes.\n\nSee also: https://neo4j.com/developer/kb/neo4j-supported-versions/\n\n+ Python 3.13 supported (since driver version 5.26.0).\n+ Python 3.12 supported (since driver version 5.14.0).\n+ Python 3.11 supported (since driver version 5.3.0).\n+ Python 3.10 supported.\n+ Python 3.9 supported.\n+ Python 3.8 supported.\n+ Python 3.7 supported.\n\n\nInstallation\n============\n\nTo install the latest stable version, use:\n\n.. code:: bash\n\n    pip install neo4j\n\n\n.. TODO: 7.0 - remove this note\n\n.. note::\n\n    ``neo4j-driver`` is the old name for this package. It is now deprecated and\n    and will receive no further updates starting with 6.0.0. Make sure to\n    install ``neo4j`` as shown above.\n\n\nAlternative Installation for Better Performance\n-----------------------------------------------\n\nYou may want to have a look at the available Rust extensions for this driver\nfor better performance. The Rust extensions are not installed by default. For\nmore information, see `neo4j-rust-ext`_.\n\n.. _neo4j-rust-ext: https://github.com/neo4j/neo4j-python-driver-rust-ext\n\n\nQuick Example\n=============\n\n.. code-block:: python\n\n    from neo4j import GraphDatabase, RoutingControl\n\n\n    URI = \"neo4j://localhost:7687\"\n    AUTH = (\"neo4j\", \"password\")\n\n\n    def add_friend(driver, name, friend_name):\n        driver.execute_query(\n            \"MERGE (a:Person {name: $name}) \"\n            \"MERGE (friend:Person {name: $friend_name}) \"\n            \"MERGE (a)-[:KNOWS]->(friend)\",\n            name=name, friend_name=friend_name, database_=\"neo4j\",\n        )\n\n\n    def print_friends(driver, name):\n        records, _, _ = driver.execute_query(\n            \"MATCH (a:Person)-[:KNOWS]->(friend) WHERE a.name = $name \"\n            \"RETURN friend.name ORDER BY friend.name\",\n            name=name, database_=\"neo4j\", routing_=RoutingControl.READ,\n        )\n        for record in records:\n            print(record[\"friend.name\"])\n\n\n    with GraphDatabase.driver(URI, auth=AUTH) as driver:\n        add_friend(driver, \"Arthur\", \"Guinevere\")\n        add_friend(driver, \"Arthur\", \"Lancelot\")\n        add_friend(driver, \"Arthur\", \"Merlin\")\n        print_friends(driver, \"Arthur\")\n\n\nFurther Information\n===================\n\n* `The Neo4j Operations Manual`_ (docs on how to run a Neo4j server)\n* `The Neo4j Python Driver Manual`_ (good introduction to this driver)\n* `Python Driver API Documentation`_ (full API documentation for this driver)\n* `Neo4j Cypher Cheat Sheet`_ (summary of Cypher syntax - Neo4j's graph query language)\n* `Example Project`_ (small web application using this driver)\n* `GraphAcademy`_ (interactive, free online trainings for Neo4j)\n* `Driver Wiki`_ (includes change logs)\n* `Neo4j Migration Guide`_\n\n.. _`The Neo4j Operations Manual`: https://neo4j.com/docs/operations-manual/current/\n.. _`The Neo4j Python Driver Manual`: https://neo4j.com/docs/python-manual/current/\n.. _`Python Driver API Documentation`: https://neo4j.com/docs/api/python-driver/current/\n.. _`Neo4j Cypher Cheat Sheet`: https://neo4j.com/docs/cypher-cheat-sheet/\n.. _`Example Project`: https://github.com/neo4j-examples/movies-python-bolt\n.. _`GraphAcademy`: https://graphacademy.neo4j.com/categories/python/\n.. _`Driver Wiki`: https://github.com/neo4j/neo4j-python-driver/wiki\n.. _`Neo4j Migration Guide`: https://neo4j.com/docs/migration-guide/current/\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Neo4j Bolt driver for Python",
    "version": "5.26.0",
    "project_urls": {
        "Changelog": "https://github.com/neo4j/neo4j-python-driver/wiki",
        "Discord": "https://discord.com/invite/neo4j",
        "Docs (API Reference)": "https://neo4j.com/docs/api/python-driver/current/",
        "Docs (Manual)": "https://neo4j.com/docs/python-manual/current/",
        "Forum": "https://community.neo4j.com/c/drivers-stacks/python/",
        "Homepage": "https://neo4j.com/",
        "Issue Tracker": "https://github.com/neo4j/neo4j-python-driver/issues",
        "Repository": "https://github.com/neo4j/neo4j-python-driver"
    },
    "split_keywords": [
        "neo4j",
        " graph",
        " database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a9f5f18f25676e66d386490b490d710719cc695853cee5f143b68755ba3a7e5",
                "md5": "38d46ee2ae6aafe02ce065eb558522b5",
                "sha256": "c3b205a113f95c692dd9842c09db17e8e227bdc099e934db8bc1ae16f68f0967"
            },
            "downloads": -1,
            "filename": "neo4j-driver-5.26.0.tar.gz",
            "has_sig": false,
            "md5_digest": "38d46ee2ae6aafe02ce065eb558522b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 224236,
            "upload_time": "2024-11-01T13:15:17",
            "upload_time_iso_8601": "2024-11-01T13:15:17.380151Z",
            "url": "https://files.pythonhosted.org/packages/4a/9f/5f18f25676e66d386490b490d710719cc695853cee5f143b68755ba3a7e5/neo4j-driver-5.26.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-01 13:15:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neo4j",
    "github_project": "neo4j-python-driver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pytz",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "neo4j-driver"
}
        
Elapsed time: 0.39569s