Skip to content

An Object Graph Mapper (OGM) for the neo4j graph database

License

Notifications You must be signed in to change notification settings

mRoca/neomodel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neomodel

An Object Graph Mapper (OGM) for the neo4j graph database, built on the awesome neo4j_driver

  • Familiar Django model style definitions.
  • Powerful query API.
  • Enforce your schema through cardinality restrictions.
  • Full transaction support.
  • Thread safe.
  • Hooks including (optional) Django signals support.
https://secure.travis-ci.org/robinedwards/neomodel.png

Documentation

Available on readthedocs.

Requirements

  • Python 2.7, 3.5
  • neo4j 3+

Installation

Install from pypi (recommended):

$ pip install neomodel

To install from github:

$ pip install git+git://github.com/robinedwards/neomodel.git@HEAD#egg=neomodel-dev

Upgrading 2.x to 3.x

  • Now utilises neo4j_driver as the backend which uses bolt so neo4j 3 is required
  • NEO4J_REST_URL has become NEO4J_BOLT_URL (see docs below)
  • The deprecated category() method on StructuredNode has been removed
  • The streaming=True flag is now irrelevant with bolt and produces a deprecation warning
  • Batch operations must now be wrapped in a transaction in order to be atomic.

Contributing

Ideas, bugs, tests and pull requests always welcome.

Running the test suite

Make sure you have a fresh virtualenv and nose installed:

$ pip install nose

A Neo4j database to run the tests on, make sure you have set a password from the web interface prior to running the tests. (it will wipe this database):

$ export NEO4J_BOLT_URL=bolt://neo4j:test@localhost # (the default)

Setup a virtual environment, install neomodel for development and run the test suite:

$ virtualenv venv
$ source venv/bin/activate
$ python setup.py develop
$ nosetests -s
Join the chat at https://gitter.im/robinedwards/neomodel

About

An Object Graph Mapper (OGM) for the neo4j graph database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.3%
  • Shell 0.7%