skillfed

neomodel

An object mapper for the neo4j graph database.

neomodel v6.2.0 227.7K downloads/30d#9,169 on PyPI1,089
Permissive license MIT Active released

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 neomodel

uv

uv add neomodel

poetry

poetry add neomodel

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: DatabaseTopic :: Software Development :: Libraries :: Python Modules

Tags

neo4j object mappergraph database ORMneo4j python OGMgraph model definitionsneo4j query builderpython graph databaseneo4j class models
graph-databaseorm-ogmneo4j

More Python Modules packages