Welcome to prov2neo! 👋
prov2neois a Python library and command line tool that imports W3C PROV documents into Neo4j.
prov2neoenables faster imports than comparable libs such asprov-db-connectorwith the limitation of being specialized for neo4j.
🏗️ Installation
Clone the project and use the provided setup.py to install prov2neo locally:
python setup.py install --user
Or install the latest release from PyPi:
pip install prov2neo
🚀 Usage
prov2neo can be used as a command line script or as a Python lib.
As a Command Line Script
usage: prov2neo [-h] [-f {provn,json,rdf,xml}] [-i INPUT [INPUT ...]] [-a ADDRESS]
[-u USERNAME] [-p PASSWORD] [-n NAME]
[-s {bolt,bolt+s,bolt+ssc,http,https,http+s,http+ssc}]
Import W3C PROV documents to Neo4j.
optional arguments:
-h, --help show this help message and exit
-f {provn,json,rdf,xml}, --format {provn,json,rdf,xml}
input PROV format
-i INPUT [INPUT ...], --input INPUT [INPUT ...]
input files, use '.' for stdin
-a ADDRESS, --address ADDRESS
Neo4j address
-u USERNAME, --username USERNAME
Neo4j username
-p PASSWORD, --password PASSWORD
Neo4j password
-n NAME, --name NAME Neo4j target database name
-s {bolt,bolt+s,bolt+ssc,http,https,http+s,http+ssc}, --scheme {bolt,bolt+s,bolt+ssc,http,https,http+s,http+ssc}
connection scheme to use when connecting to Neo4j
As a Python Lib
from prov.model import ProvDocument
from prov2neo.client import Client
# read graph from JSON serialization
graph = ProvDocument.deserialize(source="examples/horsemeat.json", format="json")
# create a prov2neo client
client = Client()
# connect to the neo4j instance
client.connect(
address="localhost:7687",
user="jane doe",
password="**redacted**",
name="database name",
scheme="bolt"
)
# import the PROV graph
client.import_graph(graph)
prov2neo supports formats that the prov library provides:
🤝 Contributing
Contributions and pull requests are welcome!
For major changes, please open an issue first to discuss what you would like to change.
✨ Citable Software
This project contains a CITATION.cff file!
CITATION.cff files are plain text files with human- and machine-readable citation information for software (and datasets).
GitHub will link the correct citation automatically.
To find out more about GitHubs support for CITATION.cff files visit here
📝 License
Copyright © 2020-2022 German Aerospace Center (DLR) and individual contributors.
This project is MIT licensed.
Metadata
Release files for prov2neo 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prov2neo-1.2.2.tar.gz | 13.5 kB | Without provenance | Details for prov2neo-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prov2neo-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for prov2neo-1.2.2-py3-none-any.whl |
Total release size: 25.9 kB
Release files / prov2neo-1.2.2.tar.gz
| Download URL | prov2neo-1.2.2.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c1f2c5801cd5c45091a85252c8d7beddd1b230466b43416880035dda3efb967
|
|
BLAKE2b-256 checksum How to use checksums |
1527cd1098eaa7992b4f82986077ee357c5837a7a99c26cb2579bff02e6a6d39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / prov2neo-1.2.2-py3-none-any.whl
| Download URL | prov2neo-1.2.2-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56f78da83f15eaaee8326d513d99da43f1dee091b1051908197b19d0fa9aeec2
|
|
BLAKE2b-256 checksum How to use checksums |
e93e949a3fef00abbbe869a17102ef1b66741f5fa5564c71ea6d19943ba761fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for prov2neo 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.