https://github.com/mhrimaz/py-aas-rdf
py-aas-rdf allows you to convert AAS/JSON to AAS/RDF and vice versa according to the official RDF representaiton.
https://github.com/mhrimaz/py-aas-rdf
aas assetadministrationshell rdf shacl sparql
Last synced: 2 months ago
JSON representation
py-aas-rdf allows you to convert AAS/JSON to AAS/RDF and vice versa according to the official RDF representaiton.
- Host: GitHub
- URL: https://github.com/mhrimaz/py-aas-rdf
- Owner: mhrimaz
- License: mit
- Created: 2024-01-18T12:04:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-22T18:49:56.000Z (2 months ago)
- Last Synced: 2025-02-22T19:31:40.381Z (2 months ago)
- Topics: aas, assetadministrationshell, rdf, shacl, sparql
- Language: Python
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
==========
py-aas-rdf
==========py-aas-rdf allows you to convert AAS/JSON to AAS/RDF and vice versa according to the official RDF representaiton.
Installation
===================``!pip install git+https://github.com/mhrimaz/py-aas-rdf.git@main --quiet``
Python Code Example
===================
.. code-block:: pythonfrom py_aas_rdf.models.submodel import Submodel
from py_aas_rdf.models.property import Property
import json
graph, node = Submodel(**{"id":"test", "modelType":"Submodel"}).to_rdf()
print(graph.serialize(format="turtle_custom"))You can use this Jupyter Notebook (https://colab.research.google.com/drive/14myWROAKKG_0LX_U4stohioPfAIrqGhY?usp=sharing) that has a simple interface to convert JSON to RDF and vice versa.
You can find in this Jupyter Notebook (https://colab.research.google.com/drive/1CwNy18p6gSNmHWd4Ng6F7z0a0XRf3WjY?usp=sharing) an example that showcase how SPARQL can be used to query the Asset Administration Shell.