{
"info": {
"author": "Dave Vieglais",
"author_email": "",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Topic :: Scientific/Engineering"
],
"description": "# pyTBSHACL\nPython wrapper for TopQuadrant's TopBraid SHACL validator.\n\n[PySHACL](https://github.com/RDFLib/pySHACL) for RDFLib \n[does not currently implement](https://github.com/RDFLib/pySHACL/blob/master/FEATURES.md) \nsome of the [advanced SHACL functionality](https://www.w3.org/TR/shacl-af/) \nwhich is available with [TopBraid's command line validator](https://github.com/TopQuadrant/shacl). \n`pyTBSHACL` implements a python wrapper for the TopBraid validator tool \nto help simplify integration with python projects \nneeding that functionality. It is anticipated that this module will \nbecome redundant as adavanced capabilities are progressively added to PySHACL.\n\n## Status\n\nVersion 0.0.1 (2019-08-21):\n\nInitial complete implementation. Shape files must be in turtle, data files\nmay be in any RDF format supported by RDFLib. Output in turtle, plain text,\nor json. Tested on OS X only.\n\n\n## Installation\n\n1\\. Download and install the TopBraid SHACL validator, following guidance at:\n\n https://github.com/TopQuadrant/shacl\n\n Optionally build the validator from source, see \"Building the Validator \n from Source\" below.\n\n2\\. Set the `SHACLROOT` environment variable to the absolute path to the\n`bin` folder of the TopBraid SHACL validator distribution.\n\n3\\. `pip install -U pyTBSHACL` or clone this repo, cd to the folder, \nthen run: `pip install -e .`\n\n## Example\n\nFollowing are run from the `examples` folder.\n\nValid data:\n\n```\n$ shacl -d data_00a.ttl -s shape_00.ttl\n@prefix ex: .\n@prefix sh: .\n@prefix rdf: .\n@prefix owl: .\n@prefix xsd: .\n@prefix rdfs: .\n\n[ a sh:ValidationReport ;\n sh:conforms true\n] .\n```\n\nInvalid data:\n\n```\n$ shacl -d data_00b.ttl -s shape_00.ttl\n@prefix ex: .\n@prefix sh: .\n@prefix rdf: .\n@prefix owl: .\n@prefix xsd: .\n@prefix rdfs: .\n\n[ a sh:ValidationReport ;\n sh:conforms false ;\n sh:result [ a sh:ValidationResult ;\n sh:focusNode ex:bob ;\n sh:resultMessage \"Does not have value ex:Mathematics\" ;\n sh:resultPath ex:field ;\n sh:resultSeverity sh:Violation ;\n sh:sourceConstraintComponent sh:HasValueConstraintComponent ;\n sh:sourceShape []\n ]\n] .\n```\n\nInvalid data with text output:\n\n```\n$ shacl -d data_00b.ttl -s shape_00.ttl -of text\nValidation Report\nConforms: False\nResults (1):\nResults for focus node http://example.org/bob:\n Path: http://example.org/field\n Severity: Violation\n Constraint violation in HasValueConstraintComponent\n Message: Does not have value ex:Mathematics\n Source shape: ub2bL15C48\n```\n\n\n\nValid Dataset with encoding in json-ld:\n\n```\n$ shacl -d data_01a.json -df json-ld -s shape_01.ttl\n@prefix : .\n@prefix sh: .\n@prefix rdf: .\n@prefix owl: .\n@prefix xml: .\n@prefix xsd: .\n@prefix rdfs: .\n\n[ a sh:ValidationReport ;\n sh:conforms true\n] .\n```\n\nInvalid Dataset encoding:\n\n```\n$ shacl -d data_01b.ttl -s shape_01.ttl\n@prefix schema: .\n@prefix ex: .\n@prefix sh: .\n@prefix rdf: .\n@prefix owl: .\n@prefix xsd: .\n@prefix rdfs: .\n\n[ a sh:ValidationReport ;\n sh:conforms false ;\n sh:result [ a sh:ValidationResult ;\n sh:focusNode ex:dataset2_encoding ;\n sh:resultMessage \"A schema:contentUrl is required for the encoding property of a Dataset\" ;\n sh:resultPath schema:contentUrl ;\n sh:resultSeverity sh:Violation ;\n sh:sourceConstraintComponent sh:MinCountConstraintComponent ;\n sh:sourceShape \n ] ;\n sh:result [ a sh:ValidationResult ;\n sh:focusNode ex:dataset2_encoding ;\n sh:resultMessage \"Property needs to have at least 1 values, but found 0\" ;\n sh:resultPath schema:encodingFormat ;\n sh:resultSeverity sh:Violation ;\n sh:sourceConstraintComponent sh:MinCountConstraintComponent ;\n sh:sourceShape \n ] ;\n sh:result [ a sh:ValidationResult ;\n sh:focusNode [] ;\n sh:resultMessage \"Property needs to have at least 1 values, but found 0\" ;\n sh:resultPath schema:encodingFormat ;\n sh:resultSeverity sh:Violation ;\n sh:sourceConstraintComponent sh:MinCountConstraintComponent ;\n sh:sourceShape \n ]\n] .\n```\n\n\n## Building the Validator from Source\n\nThe most recent version of the TopBraid shacl validator can be built \nfrom source as follows:\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/TopQuadrant/shacl\n```\n\n2. Build the package:\n\n```\ncd shacl\nmvn clean package \n```\n\n3. Deploy the built package. The package is a .zip file in the `target` \nfolder named like ``. Unzip that file to the desired installation\nlocation, e.g.:\n\n```\ncd ~/bin\nunzip ~/git/shacl/target/shacl-1.x.y-SNAPSHOT-bin.zip\nexport SHACLROOT=\"~/git/shacl/target/shacl-1.x.y-SNAPSHOT/bin\"\n```\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/datadavev/pyTBSHACL",
"keywords": "SHACL RDF validation JSON-LD",
"license": "Apache 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "pyTBSHACL",
"package_url": "https://pypi.org/project/pyTBSHACL/",
"platform": "",
"project_url": "https://pypi.org/project/pyTBSHACL/",
"project_urls": {
"Homepage": "https://github.com/datadavev/pyTBSHACL"
},
"release_url": "https://pypi.org/project/pyTBSHACL/0.0.1/",
"requires_dist": [
"rdflib (>=4.2)",
"jinja2"
],
"requires_python": "",
"summary": "Python wrapper for TopBraid SHACL validator",
"version": "0.0.1"
},
"last_serial": 5710383,
"releases": {
"0.0.0b2": [
{
"comment_text": "",
"digests": {
"md5": "2dff6ad7d56d3a5537131ab61c7da2ce",
"sha256": "61bd764e40c08b5fe73ca62c57e6687e78289d56adabece840e4704b2a5d9500"
},
"downloads": -1,
"filename": "pyTBSHACL-0.0.0b2.tar.gz",
"has_sig": false,
"md5_digest": "2dff6ad7d56d3a5537131ab61c7da2ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5071,
"upload_time": "2019-08-16T13:47:52",
"url": "https://files.pythonhosted.org/packages/10/e7/b38b501be8230a04167cbf8a5052f7a4bcb4a10a45bb036b4683e5d77ee1/pyTBSHACL-0.0.0b2.tar.gz"
}
],
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "6dd346b817a8329f2e1c70a40e2a33ab",
"sha256": "6bd409bb32d209c69b4c6779eb1aa5b9ffc8619c15446999e2d4e47dbaa85222"
},
"downloads": -1,
"filename": "pyTBSHACL-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6dd346b817a8329f2e1c70a40e2a33ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10132,
"upload_time": "2019-08-21T15:28:13",
"url": "https://files.pythonhosted.org/packages/8c/08/245dfb9dc3b64121a6c7526a315bab961017267f354c979c426634a8eb9b/pyTBSHACL-0.0.1-py3-none-any.whl"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6dd346b817a8329f2e1c70a40e2a33ab",
"sha256": "6bd409bb32d209c69b4c6779eb1aa5b9ffc8619c15446999e2d4e47dbaa85222"
},
"downloads": -1,
"filename": "pyTBSHACL-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6dd346b817a8329f2e1c70a40e2a33ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10132,
"upload_time": "2019-08-21T15:28:13",
"url": "https://files.pythonhosted.org/packages/8c/08/245dfb9dc3b64121a6c7526a315bab961017267f354c979c426634a8eb9b/pyTBSHACL-0.0.1-py3-none-any.whl"
}
]
}