Metadata-Version: 2.4
Name: vo-wot
Version: 0.18.15
Summary: Virtual Object python implementation using a W3C WoT Runtime and the WoT Scripting API
Author-email: Andres Garcia Mangas <andres.garcia@fundacionctic.org>
Maintainer-email: Nikos Filinis <nfilinis@netmode.ntua.gr>, Dimitris Spatharakis <dspatharakis@netmode.ntua.gr>
License: MIT License
        
        Copyright (c) 2023 National Technical University of Athens
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Documentation, https://netmode.gitlab.io/vo-wot/
Project-URL: Repository, https://gitlab.eclipse.org/eclipse-research-labs/nephele-project/vo-wot.git
Keywords: wot,iot,gateway,fog,w3c,vo,virtual object
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tornado<7.0,>=6.4.2
Requires-Dist: jsonschema<5.0,>=4.23
Requires-Dist: reactivex<5.0,>=4.0.4
Requires-Dist: python-slugify<9.0,>=8.0.4
Requires-Dist: requests-oauthlib<3.0,>=2.0.0
Requires-Dist: influxdb-client<1.49.0,>=1.48.0
Requires-Dist: statsmodels==0.14.4
Requires-Dist: numpy==2.2.2; python_version >= "3.12"
Requires-Dist: numpy==1.26.4; python_version >= "3.9" and python_version < "3.12"
Requires-Dist: pyOpenSSL<26.0.0,>=25.0.0
Requires-Dist: aiocoap[linkheader,oscore]==0.4.7; platform_system != "Darwin"
Requires-Dist: amqtt==0.11.0b1
Requires-Dist: eclipse-zenoh==1.0.2
Requires-Dist: websockets<11.0,>=10.0.0
Provides-Extra: tests
Requires-Dist: pytest>=8.3.5; extra == "tests"
Requires-Dist: pytest-cov<7.0.0,>=6.1.1; extra == "tests"
Requires-Dist: pytest-rerunfailures<16.0,>=15.0; extra == "tests"
Requires-Dist: faker<38.0.0,>=37.1.0; extra == "tests"
Provides-Extra: docs
Requires-Dist: Sphinx<7.0.0,>=6.1.3; extra == "docs"
Requires-Dist: sphinx-rtd-theme<2.0.0,>=1.2.0; extra == "docs"
Dynamic: license-file

# VO-WoT

This repository is based on the Web of Things Python implementation [WoTPy](https://github.com/agmangas/wot-py).

[![PyPI](https://img.shields.io/pypi/v/vo-wot)](https://pypi.org/project/vo-wot/)
[![coverage report](https://gitlab.eclipse.org/eclipse-research-labs/nephele-project/vo-wot/badges/main/coverage.svg)](https://gitlab.eclipse.org/eclipse-research-labs/nephele-project/vo-wot/-/commits/main)
## Introduction

This repository is a fork of the original [WoTPy](https://github.com/agmangas/wot-py) repository.

VO-WoT is an experimental implementation of a [W3C WoT Runtime](https://github.com/w3c/wot-architecture/blob/master/proposals/terminology.md#wot-runtime) and the [W3C WoT Scripting API](https://github.com/w3c/wot-architecture/blob/master/proposals/terminology.md#scripting-api) in Python.

Inspired by the exploratory implementations located in the [Eclipse thingweb GitHub page](https://github.com/eclipse-thingweb/).

## Features
- Supports Python 3 with versions >= 3.9
- Fully-implemented `WoT` interface.
- Asynchronous I/O programming model based on coroutines.
- Multiple client and server [Protocol Binding](https://github.com/w3c/wot-architecture/blob/master/proposals/terminology.md#protocol-binding) implementations.

### Feature support matrix

|            Feature |  Python 3           | Implementation based on                                                 |
| -----------------: |  ------------------ | ----------------------------------------------------------------------- |
|       HTTP binding |  :heavy_check_mark: | [tornadoweb/tornado](https://github.com/tornadoweb/tornado)             |
| WebSockets binding |  :heavy_check_mark: | [tornadoweb/tornado](https://github.com/tornadoweb/tornado)             |
|       CoAP binding |  :heavy_check_mark: | [chrysn/aiocoap](https://github.com/chrysn/aiocoap)                     |
|       MQTT binding |  :heavy_check_mark: | [Yakifo/amqtt](https://github.com/Yakifo/amqtt)             |


## Installation
```
pip install vo-wot
```

### Development

To install in development mode with all the test dependencies:

```
pip install -U -e .[tests,docs]
```

Some WoTPy features (e.g. CoAP binding) are not available outside of Linux. If you have Docker available in your system, and want to easily run the tests in a Linux environment (whether you're on macOS or Windows) you can use the Docker-based test script:

```
$ WOTPY_TESTS_MQTT_BROKER_URL=mqtt://192.168.1.141 ./pytest-docker-all.sh
...
+ docker run --rm -it -v /var/folders/zd/02pk7r3954s_t03lktjmvbdc0000gn/T/wotpy-547bed6bacf34ddc95b41eceb46553dd:/app -e WOTPY_TESTS_MQTT_BROKER_URL=mqtt://192.168.1.141 python:3.9 /bin/bash -c 'cd /app && pip install -U .[tests] && pytest -v --disable-warnings'
...
Python 3.9 :: OK
Python 3.10 :: OK
Python 3.11 :: OK
Python 3.12 :: OK
Python 3.13 :: OK
```
`WOTPY_TESTS_MQTT_BROKER_URL` defines the url of the MQTT broker. It will listen to port `1883` by default. If your broker is set up in a different way, you can provide the port in the url as well.

`WOTPY_TESTS_ZENOH_ROUTER_URL` defines the url of the Zenoh router. An example router url value is `tcp/192.168.1.1:7447` assuming the router is bound on the interface with the IP `192.168.1.1` and listens to port `7447`. Check the Zenoh router's output (`zenohd` command) for more info.

You can also test only for a specific Python version with the `PYTHON_TAG` variable and the `pytest-docker.sh` script like this:

```
$ WOTPY_TESTS_MQTT_BROKER_URL=mqtt://192.168.1.141 PYTHON_TAG=3.9 ./pytest-docker.sh
```
### Development in VSCode with devcontainers
We have also provided a convenient `devcontainer` configuration to better recreate your local development environment. VSCode should detect it if you have the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension installed.

## Docs
The documentation is currently hosted [here](https://netmode.gitlab.io/vo-wot/).

Alternatively to build the documentation, move to the `docs` folder and run:

```
make html
```

