Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

A microframework for Neo4J inspired by SQLAlchemy.

Project Description


.. image::
:alt: Docs for 0.8.0b
.. image::

.. image::

NeoAlchemy is a SqlAlchemy-like tool for working with the Neo4J graph database
in Python. It is intended to be very easy to use, and intuitively familiar to
anyone who has used SqlAlchemy and/or the Cypher Query Language.

NeoAlchemy is built on top of the Neo4J Bolt driver and only supports Neo4J
3.0+ connected over the Bolt protocol. It supports Python 2.7 and 3.3+.

Getting Started

NeoAlchemy is available on `PyPI`_, so it can be installed normally using
`pip install neoalchemy`. NeoAlchemy is built on top of the `official Neo4J
Python driver`_. If you install from PyPI, this will automatically be
installed alongside it. You can also install the dependencies using `pip
install -r requirements.txt`.

`Questions, support requests, comments`_, and `contributions`_ should be
directed to GitHub accordingly.

Low-Level QueryBuilder API


import uuid

from neoalchemy import Create, Node, Property, Graph
from neoalchemy.validators import UUID

graph = Graph()

person = Node('Person', # primary label
uuid=Property(unique=True, type=UUID, default=uuid.uuid4),
screen_name=Property(indexed=True, type=str.lower),

# Emit schema-generating DDL

person.real_name = 'Alison'
person.screen_name = 'Ali42'
person.age = 29
create = Create(person)

graph.query(create, **create.params)

`Learn more about the QueryBuilder API`_.

High-Level Schema OGM


import uuid

from neoalchemy import OGMBase, Property, Graph
from neoalchemy.validators import UUID

class Person(OGMBase):
graph = Graph()

uuid = Property(unique=True, type=UUID, default=uuid.uuid4)
real_name = Property(indexed=True)
screen_name = Property(indexed=True, type=str.lower)
age = Property(type=int)

# Cypher schema generation emitted automatically
# No user action required

Person(real_name='Alison', screen_name='Ali42', age=29).create()

`Learn more about the Schema OGM`_.

.. _PyPI:
.. _official Neo4J Python driver:
.. _Questions, support requests, comments:
.. _contributions:
.. _Learn more about the QueryBuilder API:
.. _Learn more about the Schema ORM:

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(13.2 kB) Copy SHA256 Hash SHA256
Source Feb 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting