Skip to main content

KA Python library providing RDF ontology definitions for SysML.

Project description

py-sysml-rdf

A Python library providing RDF ontology definitions for SysML (Systems Modeling Language). This library contains a generated TTL (Turtle) file with SysML ontology definitions and provides a convenient Python interface to access the ontology classes and properties.

Installation

pip install py-sysml-rdf

Usage

from py_sysml_rdf import SYSML
from rdflib import URIRef, Graph, RDF

g = Graph()
g.bind("sysml", SYSML._NS)
g.add((URIRef("http://example.org#actor_x"), RDF.type, SYSML.Actor))

Development

Regenerating the Ontology

If you need to recreate the TTL file:

python create_sysml_ontology.py

Testing

Run the test script to verify everything works:

python -m pytest tests/

Building the Package

poetry build

Publish the Package

poetry config pypi-token.pypi <DEIN_TOKEN>
poetry publish 

Ontology Visualization

Visualize the ontology with WebVOWL

SysML Ontology

Publishing to PyPI

  1. Test PyPI (recommended first):

    python -m twine upload --repository testpypi dist/*
    
  2. Production PyPI:

    python -m twine upload dist/*
    

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

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

Source Distribution

py_sysml_rdf-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_sysml_rdf-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file py_sysml_rdf-0.0.1.tar.gz.

File metadata

  • Download URL: py_sysml_rdf-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.1 Windows/10

File hashes

Hashes for py_sysml_rdf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c839661268fb553de21f6b092e0252c04b5c7772db680bf86c6abcc6e3e09f0b
MD5 6f23a7c563bf2919473f249fd309d449
BLAKE2b-256 3bc39b4575c63ac915e8e4646ac36e2542e8d9120a722c7a2919603d8e591a5b

See more details on using hashes here.

File details

Details for the file py_sysml_rdf-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_sysml_rdf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.1 Windows/10

File hashes

Hashes for py_sysml_rdf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db5aac44f5b5b6808b7906464898bb8b1cc29f7ca08feba522e30a06c67af3cf
MD5 7e81feb5e346b8146d47e48388cdd211
BLAKE2b-256 43a71b59b2c8dd6aab8166a3aa5f360b7d045f458aea70124188e914cd305809

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page