Skip to main content

Ontol DSL Parser

Build Status PyPi downloads

Authors: Skvortsov Vladimir, Aptukov Mikhail, Markov Mikhail, Khamidullin Ilsaf, Afanasyev Andrew.

Ontol DSL Parser is a command-line tool for parsing and visualizing ontology files written in the Ontol DSL. It generates JSON representations and PlantUML diagrams from .ontol files.

Explore Ontol DSL in the Online REPL

Features

  • Parse .ontol files to extract ontology structures.
  • Serialize ontology to JSON format.
  • Generate PlantUML diagrams from ontology.
  • Automatically render PlantUML diagrams to PNG images.
  • Watch files for changes and re-parse them automatically.
  • Display version and help information.

Requirements

  • Python 3.9 or higher.

Installation

Install from PyPi:

pip install ontol

Usage

Parse a file

To parse an .ontol file and generate JSON and PlantUML files:

ontol path/to/yourfile.ontol

Watch Mode

To watch a file for changes and automatically re-parse it:

ontol path/to/yourfile.ontol --watch

Debug mode

To enable debug mode, which retranslates the output back to the .ontol file:

ontol path/to/yourfile.ontol --debug

Display Version

To display the version of the program:

ontol --version

Help

To display help information:

ontol --help

Tests

To display run tests:

pytest tests

Output

  • JSON File: A JSON representation of the ontology is saved with the same basename as the .ontol file.
  • PlantUML File: A .puml file is generated for visualization.
  • PNG Image: A PNG image is rendered from the PlantUML file.

Debug mode

When the --debug flag is used, the parser retranslates the output back to the .ontol file. This is particularly useful for debugging, as it allows you to verify the accuracy and consistency of the parsing process. The retranslated file is saved with the same name as the original .ontol file, enabling easy comparison between the original and retranslated versions.

Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes.
  4. Ensure all tests pass by running pytest tests.
  5. Submit a pull request.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Acknowledgments

  • Thanks to the PlantUML team for providing an excellent tool for diagram generation.
  • Special thanks to all contributors and users of the Ontol DSL Parser.
  • A heartfelt thank you to Danil Pestryakov and Nikita Motorny for their inspiration and support.

Metadata

Release files for ontol 2.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ontol 2.14.1
File Size Uploaded Provenance Actions
ontol-2.14.1.tar.gz 33.3 kB Without provenance Details for ontol-2.14.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ontol 2.14.1
File Interpreter ABI Platform Actions
ontol-2.14.1-py3-none-any.whl Python 3 none any Details for ontol-2.14.1-py3-none-any.whl

Total release size: 61.4 kB

Release files / ontol-2.14.1.tar.gz

Download URL ontol-2.14.1.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ccec31c94210245f5404693f8761587d30fe1019c937418e97be7f867f4a7662
BLAKE2b-256 checksum
How to use checksums
1d77c18c3307e620a86b19d8129f7d7028e7a62c89bfe74ef807214f019f4639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / ontol-2.14.1-py3-none-any.whl

Download URL ontol-2.14.1-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82a6e20237ca9e033610c509f182c5c610528f049daa3236ae026932a8d934a9
BLAKE2b-256 checksum
How to use checksums
3a4f6510beb5b6ba684b52020af4d72c0ea07d66cfc36232dfe6be4241dd741f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for ontol 2.14.1

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.

Release history Release notifications | RSS feed

This release

2.14.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page