Skip to content

Commit

Permalink
added key,update functions to Relationship/Node objects in rel2graph.…
Browse files Browse the repository at this point in the history
…neo4j
  • Loading branch information
jkminder committed Apr 5, 2024
1 parent 2a5753b commit c9bf1f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The library is built specifically for converting data into a [neo4j](https://neo
This library has been developed at the [Chair of Systems Design at ETH Zürich](https://www.sg.ethz.ch).

## Installation
If you have setup a private ssh key for your github, copy-paste the command below to install the latest version ([v1.3.0][latest_tag]):
If you have setup a private ssh key for your github, copy-paste the command below to install the latest version ([v1.3.1][latest_tag]):
```
pip install git+ssh://[email protected]/sg-dev/[email protected].0
pip install git+ssh://[email protected]/sg-dev/[email protected].1
```

If you don't have ssh set up, download the latest wheel [here][latest_wheel] and install the wheel with:
Expand Down Expand Up @@ -94,7 +94,7 @@ converter()
# Known issues
If you encounter a bug or an unexplainable behavior, please check the [known issues](https://github.com/sg-dev/rel2graph/labels/bug) list. If your issue is not found, submit a new one.

[latest_version]: v1.3.0
[latest_tag]: https://github.com/sg-dev/rel2graph/releases/tag/v1.3.0
[latest_wheel]: https://github.com/sg-dev/rel2graph/releases/download/v1.3.0/rel2graph-1.3.0-py3-none-any.whl
[latest_version]: v1.3.1
[latest_tag]: https://github.com/sg-dev/rel2graph/releases/tag/v1.3.1
[latest_wheel]: https://github.com/sg-dev/rel2graph/releases/download/v1.3.1/rel2graph-1.3.1-py3-none-any.whl
[wiki]: https://rel2graph.jkminder.ch/index.html
8 changes: 8 additions & 0 deletions rel2graph/neo4j/graph_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ def identity(self):
def identity(self, value):
self._identity = value

def keys(self):
"""Returns properties keys"""
return self.properties.keys()

def update(self, properties):
"""Updates the properties of the element"""
self.properties.update(properties)

def __getitem__(self, key):
return self.properties[key]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
setup(
name = "rel2graph",
packages = find_packages(),
version = "1.3.0",
version = "1.3.1",
description = "Library for converting relational data into graph data (neo4j)",
author = "Julian Minder",
author_email = "[email protected]",
Expand Down

0 comments on commit c9bf1f6

Please sign in to comment.