Converter between WoT TD and SDF (including protocol bindings). Work in Progress.
Project description
SDF-WoT-Converter (Python Edition)
This repository provides a Python-based converter from SDF to WoT TD including Thing Models.
The converter is both usable as a library and a command line tool. It is based on my Rust implementation but is (when it comes to the conversion from SDF to Thing Models) already more mature as development in Python turned out to be much faster. The final version of this converter, however, will be reimplemented in Rust once it is finished to also support more constrained environments.
The CI pipeline is set up to automatically convert all (valid) models from the oneDM playground to WoT Thing Models and upload to the results to this repository.
Installation
After cloning the repository run the following commands in the repo's directory:
pip install -q build
python -m build
pip install --find-links dist/ sdf-wot-converter
You need at least Python 3.6 and pip installed.
Using the command line tool
After installing the libary you should be able to call the converter in your terminal using sdf-wot-converter
. You can display available parameters by typing sdf-wot-converter --help
. So far, you can only convert from SDF to WoT Thing models but the other direction will be added soon.
Example
# Convert an SDF model to a WoT Thing Model
sdf-wot-converter --from-sdf examples/sdf/example.sdf.json --to-tm converted-example.tm.json
License
This project is licensed under the MIT license.
SPDX-License-Identifier: MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sdf_wot_converter-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b41167bf28447094388daf5e1516d799af548e23abe46f4c6fcb9779e7582f9a |
|
MD5 | e47b55b1c188b898047bf4243762171c |
|
BLAKE2b-256 | 6734d7078f96a1f3b2cd1afcd327c1cf45cfad59e13ecde159dc51666060b221 |