• Stars
    star
    850
  • Rank 51,428 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created almost 9 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neo4j Bolt driver for Python

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.12 supported.
  • Python 3.11 supported.
  • Python 3.10 supported.
  • Python 3.9 supported.
  • Python 3.8 supported.
  • Python 3.7 supported.

Installation

To install the latest stable version, use:

pip install neo4j

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.

Quick Example

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

More Repositories

1

neo4j

Graphs for Everyone
Java
12,262
star
2

NaLLM

Repository for the NaLLM project
TypeScript
886
star
3

neo4j-javascript-driver

Neo4j Bolt driver for JavaScript
JavaScript
826
star
4

neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
TypeScript
648
star
5

graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
Java
571
star
6

neo4j-go-driver

Neo4j Bolt Driver for Go
Go
470
star
7

graphql

A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations.
TypeScript
467
star
8

neo4j-ogm

Java Object-Graph Mapping Library for Neo4j
Java
321
star
9

neo4j-java-driver

Neo4j Bolt driver for Java
Java
320
star
10

docker-neo4j

Docker Images for the Neo4j Graph Database
Shell
301
star
11

neo4j-dotnet-driver

Neo4j Bolt driver for .NET
C#
213
star
12

graph-data-science-client

A Python client for the Neo4j Graph Data Science (GDS) library
Python
158
star
13

neo4j-jdbc

Official Neo4j JDBC Driver
Java
122
star
14

neo4j-documentation

Scala
99
star
15

trillion-graph

A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.
Java
89
star
16

cypher-shell

Cypher Shell has moved to https://github.com/neo4j/neo4j
Java
88
star
17

docker-neo4j-publish

Shell
81
star
18

sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
Java
66
star
19

apoc

Java
58
star
20

helm-charts

Go
46
star
21

cypher-editor

Codemirror editor for Cypher, with syntax awareness and auto-completion
JavaScript
41
star
22

neo4j-java-driver-spring-boot-starter

Automatic configuration of Neo4j's Java Driver for Spring Boot applications
Java
34
star
23

cypher-builder

A programmatic API for building Cypher queries for Neo4j.
TypeScript
31
star
24

cypher-language-support

Neo4j's Cypher Language support
TypeScript
24
star
25

neo4j-example-auth-plugins

Example authentication and authorization plugins for Neo4j
Java
17
star
26

graphql-tracker-temp

This is a temporary repository for documentation and tracking issues for the @neo4j/graphql package until that repo is made public
12
star
27

neo4j-ogm-quarkus

Quarkus extension to that allows proper usage of Neo4j-OGM inside Quarkus.
Java
11
star
28

graph-schema-introspector

This is a Proof of concept (PoC) for a Neo4j schema introspector that produces output in JSON format validating against graph-schema-json-js-utils.
Java
11
star
29

docs-drivers

Neo4j Drivers Documentation
HTML
8
star
30

windows-wrapper

A service wrapper for windows
Java
8
star
31

neo4j.github.com

Web published resources
HTML
7
star
32

docs-cypher

Neo4j Cypher Documentation
JavaScript
7
star
33

docs-bolt

Neo4j Bolt Protocol Documentation
JavaScript
6
star
34

jsr311-api

Forked from revision 612
Java
6
star
35

dappr

Distributed Approximate Personalised PageRank
Jupyter Notebook
5
star
36

doctools

Perl
5
star
37

github-action-traceability

TypeScript
4
star
38

parents

Neo4j Build Configuration
4
star
39

docs-operations

Neo4j Operations documentation
JavaScript
3
star
40

docs-getting-started

JavaScript
3
star
41

docs-http-api

Documentation for Neo4j HTTP API
JavaScript
3
star
42

neo4j-aws-terraform

HCL
3
star
43

graph-schema-json-js-utils

Utility library to work with the Graph Schema JSON representation
TypeScript
3
star
44

jbang-catalog

JBang catalog
Java
2
star
45

docs-graphql

GraphQL docs
JavaScript
2
star
46

docs-maven-plugin

Java
2
star
47

ease-maven-plugin

Java
2
star
48

license-maven-plugin

Fork of http://code.google.com/p/maven-license-plugin/
Java
2
star
49

docs-status-codes

Documentation for Neo4j status codes
JavaScript
2
star
50

maven-skin

Neo4j Maven Skin
Java
2
star
51

docs-aura

Jupyter Notebook
2
star
52

azure-neo4j

Azure topology files
Shell
1
star
53

clirr-maven-plugin

Java
1
star
54

neo4jtester

neo4j tester
Go
1
star
55

docs-ops-manager

JavaScript
1
star