neomodel
An object mapper for the neo4j graph database.
What it is and what it does
Neomodel is an Object Graph Mapper that bridges Python classes and Neo4j graph databases. You define your domain model as Python classes with typed properties and relationships, then use a familiar ORM-style query API to fetch, filter, and traverse the graph. It handles schema enforcement through cardinality restrictions, full transactions, and pre/post hooks for lifecycle events. The package is built as a thin wrapper around the neo4j driver, so it adds minimal overhead while providing the convenience of declarative model definitions.
The library supports both synchronous and asynchronous code paths (via automatic transpilation), making it suitable for concurrent applications. It integrates with Django through a separate package and supports Neo4j Community, Enterprise, and Aura deployments. Version 6.2.0 requires Python 3.10+ and works with Neo4j 4.4 LTS through current versions, with recent additions like native semantic index support for vector and full-text search.
Use it for:
- Define a social network graph with Person and Company nodes, then query relationships like 'find all people who work at companies in a specific city'.
- Build a knowledge graph where entities and their relationships are modeled as classes, with automatic schema validation on save.
- Migrate from a relational database to Neo4j by mapping your existing ORM models to graph nodes and relationships.
- Implement transaction-safe operations in a concurrent web service that reads and writes to Neo4j without manual connection management.
- Add vector search to an application by using neomodel's native semantic index support for embedding-based queries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An Object Graph Mapper (OGM) for Neo4j that lets you define graph database models as Python classes and query them with a class-based API, built on the neo4j driver.
Yes. Neomodel is production-ready (Development Status 5), actively maintained with recent releases, has no known vulnerabilities, and low install friction. It's the right choice if you want to model a Neo4j graph as Python classes with an ORM-like query API rather than writing raw Cypher. Install it if you're building a graph application in Python and prefer declarative models over manual driver calls.
Install
neomodel on PyPI
pip
pip install neomodeluv
uv add neomodelpoetry
poetry add neomodelInstalling neomodel
Before you install
Low install friction with a pure-Python wheel and only two runtime dependencies (neo4j and typing-extensions). The project is actively maintained with a recent release and 1089 repository stars, indicating stable community backing.
License in practice
MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—you must include the license notice but have broad freedom to modify and redistribute.
Quickstart
pip install neomodel
from neomodel import StructuredNode, StringProperty, RelationshipTo
class Person(StructuredNode):
name = StringProperty(required=True)
knows = RelationshipTo('Person', 'KNOWS')
# Query: people = Person.nodes.filter(name='Alice')
Requires Python 3.10+ and a running Neo4j 4.4, 5.x, or 2025.x.x database instance with network access configured.
Verify before relying
- Actual performance overhead compared to raw neo4j driver in production workloads beyond the locust benchmarks mentioned.
- Compatibility matrix details for Neo4j 2025.x.x versions and any breaking changes from 6.0.0 not covered in the excerpt.
- Thread-safety guarantees under high concurrency with connection pooling behavior.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — neo4j, typing-extensions |
| Maintenance | actively maintained — 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 227,709/month — #9,169 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: neomodel-6.2.0-py3-none-any.whl
Keywords: graph, neo4j, ORM, OGM, mapper
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
graphlibProvides a Python API for creating,…
permissive · top 15,000 on PyPI
neo4j-driverPython driver for connecting to and querying…
permissive · top 15,000 on PyPI
py2neoPy2neo is a Python client library for Neo4j…
permissive · top 15,000 on PyPI
neo4j-graphragBuilds graph retrieval-augmented generation…
permissive · top 15,000 on PyPI
neo4jOfficial Python driver for connecting to and…
permissive · top 5,000 on PyPI
langchain-neo4jIntegrates Neo4j graph databases with…
permissive · top 15,000 on PyPI
FalkorDBFalkorDB Python client for querying and…
permissive · top 15,000 on PyPI
graphdatascienceA Python client for Neo4j Graph Data Science…
permissive · top 15,000 on PyPI
kuzuKuzu is an embedded graph database that…
permissive · top 15,000 on PyPI
webrtc-modelsProvides Python data classes that implement the…
permissive · top 15,000 on PyPI