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
sqlalchemy-neo4j-0.1.dev0.tar.gz
(17.8 kB
view hashes)
Built Distribution
Close
Hashes for sqlalchemy-neo4j-0.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 511104c4a1c6d5882b11f7f2efb137690f4c28cfd68015133e5ea3fe3bcf9ed4 |
|
MD5 | f393b0952197e8334a0b440d05f2721b |
|
BLAKE2b-256 | 93820e84353584962ba5e3e1c75b5b6d90f56c998e008c824754f4ae2b84d2ca |
Close
Hashes for sqlalchemy_neo4j-0.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ffa255569eea3d65dbdc5fb2c45f644212706e18612186ea5aa873eafa5c5cd |
|
MD5 | 15f8eb34d7dceb4ba6f57fbde9c4c9b2 |
|
BLAKE2b-256 | 9ffbd19e28408d24977629db97ce06bcc951d02dfa24b7050f5ef605f3b8ff1b |