oopycql

An object oritneted interface for the cypher query language


Keywords
graph, database, neo4j, cypher, cql
License
Apache-2.0
Install
pip install oopycql==1.1.5a2

Documentation

Build Status Coverage Status Docs Status Code style: black

OOPyCQL

An object-oriented way to manage Cypher queries in python.

Full Documentation

Installation

pip install oopycql

QuickStart

Load a query from a file using the same pythonic reference notation you would to load an object.

For example, let's imagine you have an application with a directory structure like the below.

src/
β”œ-controllers/
β”‚ β””-login/
β”‚   β”œ-cql/
β”‚   β”‚ β”œβ”€find_user_password_combination.cql
β”‚   β”‚ └─create_login_event.cql
|   β”œβ”€__init__.py
|   └─views.py
β”œβ”€__init__.py
└─app.py

To load a query in views.py, you could use the below:

from oopycql import CypherQuery

# relative style import
cq = CypherQuery('.cql.find_user_password')

# absolute style import
cq = CypherQuery('src.controllers.login.cql.create_login_event')

License

Apache

Author

Dom Weldon dom.weldon@gmail.com