Skip to main content

Neo4py is a better alternative to py2neo.

Project description

Neo4py

A proper documentation to neo4py will be available soon.

Introduction

Neo4py is an alternative to py2neo. I am trying my best to make it a perfect and better clone of the py2neo package.

How to run a query in neo4py

As it is a clone of py2neo so, I have added the similar functions like of py2neo so, that the users won't have the problem in migrating from py2neo to neo4py.

These are the steps you can use to execute a query in neo4py:

  1. Import the Graph class from the neo4py.

from neo4py import Graph

  1. Create a graph object and pass your URI, and connection details to the Graph constructor.

graph = Graph("connection_uri",("user","db_password"))

# Example code
graph = Graph("bolt://localhost:7687",("neo4j","12345678"))

You can find your connection uri and user details, when you'll start your database and open neo4j browser. Password is the password that you have set while creating the database.


  1. Now make a python dictionary, pass the data to it, and run and write the query by using built-in run method.

data = {
    "name" : "John Doe",
    "age": 21
}
node = graph.run("CREATE (p:Person {name:$name,age:$age})", **data)

Final Words

For any issues, please open an issue. I am open for suggesstions, contributions, and collaborations.😊


Special Thanks to Aaron Moffatt for letting me acquire the name, "neo4py"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neo4py-1.1.0b0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neo4py-1.1.0b0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file neo4py-1.1.0b0.tar.gz.

File metadata

  • Download URL: neo4py-1.1.0b0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for neo4py-1.1.0b0.tar.gz
Algorithm Hash digest
SHA256 e709fed39ec68f566fd89572a0b065433c46f609cd04226daf790ddddb7e1000
MD5 3d28efe3c34459360ad8d70c7379f98c
BLAKE2b-256 f6b744e093b1b6e6694eeb94de70a71bfffb890456f55ebfdef26f35f22d3518

See more details on using hashes here.

File details

Details for the file neo4py-1.1.0b0-py3-none-any.whl.

File metadata

  • Download URL: neo4py-1.1.0b0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for neo4py-1.1.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f497525c6a8ac005570b5b9888a8ab373084ea701db85fe01833cf5299b99cd
MD5 6ad416fe96f0287c3bbcfdb1eac240e3
BLAKE2b-256 42f42593d879e1284f440423284ff0d00d7f978e9d70ee27988ee3dcf8c80a7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page