prov2neo
is a Python library and command line tool that imports W3C PROV documents into Neo4j.
prov2neo
enables faster imports than comparable libs such as prov-db-connector
with the limitation of being specialized for neo4j.
Clone the project and use pip
to install prov2neo
locally:
pip install .
Or install the latest release from PyPi:
pip install prov2neo
To install prov2neo
with all dependencies for development, use:
pip install .[dev] # when cloned from GitHub
pip install prov2neo[dev] # when installing from PyPi
prov2neo can be used as a command line script or as a Python lib.
Usage: prov2neo [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Connect to a neo4j instance and import/export provenance documents.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
connect Connect to a neo4j instance.
export (Deprecated) Export a provenance document from neo4j.
import Import a provenance document into neo4j.
from prov2neo import Client, read_doc
doc = read_doc(filepath="examples/horsemeat.json")
# create a client
client = Client()
# connect to your neo4j instance
client.connect(
username="neo4j",
password="neo4j",
dbname="neo4j",
address="localhost:7687",
scheme="bolt"
)
# import the document
client.import_doc(doc)
prov2neo
supports all deserialization formats supported by the prov
library.
Deserialization and with it the import of documents through the command line tool is limited to the following formats:
Contributions and pull requests are welcome!
For major changes, please open an issue first to discuss what you would like to change.
This project is citable and contains a CITATION.cff
file!
Please cite the project using the metadata contained in the CITATION.cff
if you use prov2neo
in your research.
CITATION.cff
files are plain text files with human- and machine-readable citation information for software (and datasets).
To find out more about GitHub's support for citation metadata visit here
This project is MIT licensed.
Copyright © 2020-2022 German Aerospace Center (DLR) and individual contributors.