Skip to main content

Shacl graph generator

Project description

Shaclgen takes either a data graph(s) or schema(s) as input and generates a basic shape file based on the classes and properties present.

Shape files from data graphs: By default, the input graph is processed as a data graph (instance triples). Three formats are possible for data graphs: simple, nested, and extended.

  • Simple: Each class and property generate individual Node- and PropertyShapes.
  • Nested: Property shapes will be nested in nodeshapes iif they occur with one class.
  • Extended: Expands nested shapes to create individual property shapes for each property, in addition to nesting them when appropriate.

Shape files from ontologies: If the input is a schema or ontology, shaclgen generates a nested shape file: properties with rdfs:domain defined in the ontology will be nested within the appropriate NodeShape. rdfs:range definitions for XML and rdfs datatypes are included.

Added support for OWL constructions is planned.


Using pip:

pip install shaclgen

From source:

Command line use:

$ shaclgen graph [optional arguments]

Example usage:

$ shaclgen

Command line arguments:

positional arguments:
graph                 The data graph(s).
optional arguments:
-h, --help            show this help message and exit
-nf, --nested         generates a nested shape file
-ef, --extended       generates an expanded shape file
-o, --ontology        input file(s) or URL(s) is a schema or ontology
                      result graph serialization, default is turtle

This project is still in development. Comments, questions, and issues are welcome!

Contact alexiskm at uw dot edu.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for shaclgen, version
Filename, size File type Python version Upload date Hashes
Filename, size shaclgen- (45.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size shaclgen- (43.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page