Skip to main content

Thingweb wotpy logo

PyPI version Python Versions codecov License GitHub Workflow Status Documentation Status

A WoT runtime in Python for Thing and Consumer applications

Introduction

wotpy is an implementation of a W3C WoT Runtime and the W3C WoT Scripting API in Python.

Documentation

See the wotpy documentation.

About the current version

⚠️ Please note that there's still a significant pending issue. Although the project is currently in a reasonably stable state, it does not implement the current version of the W3C WoT specifications. Specifically, the version at the time of writing is based on the following outdated references:

ℹ️ It is in our plans to get wotpy up to speed with the latest version of the specifications. We don't have an ETA for this, but we will be working on it in the near future.

If you are looking for a Python-like reference for the current Scripting API, see the WoT namespace definition in the W3C WoT Scripting API specification. The canonical reference implementation is node-wot.

In summary, wotpy is mature enough to be used in projects; in fact, it is being used in production at CTIC. However, it is not an adequate representation of the current status of the W3C WoT. We greatly encourage you to check the Developer Resources section on the WoT website to find out about the current state of the art.

Protocol Support

The wotpy project provides implementations of these protocol bindings:

  • HTTP
  • WebSockets
  • CoAP
  • MQTT
  • Zenoh
  • Modbus

These bindings are built on top of the following dependencies, which are instrumental to the project:

Feature Implementation based on Client Server
HTTP binding tornadoweb/tornado ✔️ ✔️
WebSockets binding tornadoweb/tornado ✔️ ✔️
CoAP binding chrysn/aiocoap ✔️ ✔️
MQTT binding Yakifo/amqtt ✔️ ✔️
Zenoh binding eclipse-zenoh/zenoh-python ✔️ ✔️
Modbus binding pymodbus-dev/pymodbus ✔️ -

Installation

Install wotpy using pip:

pip install wotpy

Development

The development workflow of wotpy is based on Taskfile v3.28 or later, so that's the first thing you need to install. If you are on Windows, see Running tests on Windows.

Create a .venv virtual environment and install the project in development mode with its development, documentation, and test dependencies.

Using pip:

task venv

Using uv:

task uv-venv

If task is not available or you have an older version, you can run the underlying commands directly:

Using pip:

python3 -m venv .venv
.venv/bin/pip install -U -e ".[dev,docs,tests]"

Using uv:

uv venv .venv
uv sync --extra dev --extra docs --extra tests

Building the documentation

The docs are built with Sphinx and the Furo theme, installed with the development dependencies above.

Current documentation

From the docs/ directory:

cd docs
make html

To preview, open _build/html/index.html in a browser.

Multiple version documentation

From the docs/ directory:

cd docs
make multiversion   

make multiversion builds every release tag above v0.17.0 plus the develop branch (as develop/) with sphinx-multiversion, and writes a root index.html redirecting to develop/. Open docs/_build/index.html in a browser (serve over HTTP, e.g. python3 -m http.server). Use make clean && make multiversion to force a full rebuild.

Running tests on Windows

Some wotpy features (e.g., the CoAP binding) are not available outside of Linux. If you have Docker installed and want to run the full test suite in a Linux environment, you can use the Docker-based test task:

PYTHON_TAG=<version> task docker-tests

Replace <version> with the Python version you want to test. The task starts the MQTT broker and Zenoh router required by the tests and sets the corresponding environment variables.

Publishing New Versions

You should use the version.sh file and not change any versions anywhere manually. Running version.sh minor will bump the minor version, push the tags and update the master branch and also trigger the release. Make sure to clear the .venv environment and reinstall the packages before publishing. An unclean tree will fail the script, i.e. the develop branch must be in a clean state first.

Note: This can be only used by those who have force push rights to the develop branch. See here.

Metadata

Release files for wotpy 0.21.0

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

Source distribution (sdist)

Source distribution for wotpy 0.21.0
File Size Uploaded Provenance Actions
wotpy-0.21.0.tar.gz 106.3 kB With provenance Details for wotpy-0.21.0.tar.gz

Built distribution (wheel)

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

Total release size: 324.8 kB

Release files / wotpy-0.21.0.tar.gz

Download URL wotpy-0.21.0.tar.gz
Size 106.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dba0f63169a4501c6012469cab6cb63568a95e1df1f93cd5e1f730aa68c2bbff
BLAKE2b-256 checksum
How to use checksums
a14851ceabc00e1cb0a45f466bf12ca17b0ec23b6896dbaddfffbc7326507814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / wotpy-0.21.0-py3-none-any.whl

Download URL wotpy-0.21.0-py3-none-any.whl
Size 218.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a080e5419f9602ef6e5c7b93509e4e8717da7cb8ccc3c7d381d20f03ec150cf
BLAKE2b-256 checksum
How to use checksums
593349c2fc6cbe4b50ac8e0d38f5f32827b616ae98726e47acd0a29ffe554693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for wotpy 0.21.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wotpy-0.21.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

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.

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