Skip to content

Object-oriented interface to manage cypher queries in python.

License

Notifications You must be signed in to change notification settings

DomWeldon/oopycql

Repository files navigation

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

About

Object-oriented interface to manage cypher queries in python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published