Skip to main content

Converter between WoT TD and SDF (including protocol bindings). Work in Progress.

Project description

Build Status PyPI version codecov Code style: black

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

You can install the converter using pip:

pip install sdf-wot-converter

Afterwards, it can be used both as a command line tool and a library.

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


Download files

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

Source Distribution

sdf-wot-converter-0.3.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

sdf_wot_converter-0.3.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file sdf-wot-converter-0.3.1.tar.gz.

File metadata

  • Download URL: sdf-wot-converter-0.3.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for sdf-wot-converter-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2f9990c107cca4eb42293e45e30d08b15fef7ab3ac67f9b50c3d8d1e6cfb6daa
MD5 b5c1f331c1dc7c97c4c54b5fed76a4d2
BLAKE2b-256 301ac9e5561383780302d01ea51c95fcbbe8d9e0380ad1b62fdbe836ba95d591

See more details on using hashes here.

File details

Details for the file sdf_wot_converter-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: sdf_wot_converter-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for sdf_wot_converter-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71ca534d638e6e0035a6eda008b94b46be5c835ea008ef45b02bbee5b21479ff
MD5 e0c288cba5f4227366e0d52a60427d80
BLAKE2b-256 0e12c0d92297fb324c3aa633aa26090732525693d2c626e521dfdc84ce45305e

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