SQL Alchemy dialect for Neo4j
Project description
SQL Alchemy dialect for Neo4j
This package provides the SQL dialect for Neo4j, using the official JDBC driver (the Neo4j "BI Connector" )
Installation
pip install sqlalchemy-neo4j
Prerequisites
- Java 8 / 11
- Download the Neo4j BI Connector
The reason the JAR is not included in the package is due to licensing concerns. I may add the jar into the bundle in the future.
- Add the jar to the classpath, either directly via the
CLASSPATH
environment variable or while initializing the JVMYou can also use the
NEOJDBC_WARMUP
environment variable, which will ensure we reuse an existing jpype instance or create a new one ( with default parameters )
Getting started
from sqlalchemy import create_engine
from
# This happens automatically if you set the NEOJDBC_WARMUP environment variable
jpype.startJVM()
eng = create_engine("neo4j+jdbc://neo4j-neo4j:7687/neo4j?UID=neo4j&PWD=QUOTED_PASSWORD&LogLevel=6&StrictlyUseBoltScheme=false")
execute = engine.execute("select * from Node.YOUR_NODE limit 1")
rows = execute.fetchall()
for row in rows:
print(row)
See more examples
Related projects
- Neo4j Metabase Driver - Use Neo4j with Metabase. Use both SQL and Cypher ( the driver uses the same underlying BI connector for SQL queries )
Future
- Add Cypher support
- Add support for Cypher views in JDBC driver
- Add ORM support and testing
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
Close
Hashes for sqlalchemy-neo4j-0.2.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29eec60fad66992dbdae2c4ebd8b602647d2c14b0cbecc7c640a44d4f2116018 |
|
MD5 | d370e619325cf6cb5f56be431b5c9d58 |
|
BLAKE2b-256 | bbe90b570b9f320037f407efe0713a2d00a02f922c0b48284f1b04d9f49e8ab3 |
Close
Hashes for sqlalchemy_neo4j-0.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2b6f997a1a3b5778a39d9921708c008db13b8d8f5ed8ddbf1e07c0bf1f606ca |
|
MD5 | e41371ad9e9262ff14ca63b85e6beaea |
|
BLAKE2b-256 | 5395528e3fbc4f081e126a3c1a517e00d8b369c1c382fad7f9346e75fe611b00 |