https://github.com/floatliang/neo4japi
A simple Neo4j api driver.
https://github.com/floatliang/neo4japi
Last synced: 12 months ago
JSON representation
A simple Neo4j api driver.
- Host: GitHub
- URL: https://github.com/floatliang/neo4japi
- Owner: floatliang
- Created: 2019-11-11T10:47:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T15:51:29.000Z (over 6 years ago)
- Last Synced: 2025-02-09T09:43:06.027Z (about 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Neo4jApi
A simple Neo4j api driver.
#### Usage
* select node/relation from neo4j:
```python
with Neo4jApi() as dbi:
res = (dbi.select_by_nodes(
Node('ds', labels='DATASET', datasource_id=1)
.relationship(Relation('rel'), Node('sj', labels='SUB_DATAJOB')),
ds__id=1, ds__name=(['kafka', 'elastisearch'], 'IN')))
```
* start a transaction:
```python
with Neo4jApi() as dbi:
with dbi.start_transaction() as _t:
dbi.insert(Node(labels='DATASOURCE', **data_source), t=_t)
```