All Projects → agmangas → wot-py

agmangas / wot-py

Licence: MIT License
WoTPy is an experimental implementation of a W3C Web of Things runtime

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to wot-py

StressThing
a software testing platform to perform stress test on web of things
Stars: ✭ 12 (-45.45%)
Mutual labels:  web-of-things, wot
automate-home
Yet another python home automation (iot) project. Because a smart light is more than just on or off.
Stars: ✭ 59 (+168.18%)
Mutual labels:  asyncio
py17track
📦 A simple API to track package info from 17track.com
Stars: ✭ 20 (-9.09%)
Mutual labels:  asyncio
aiohttp-jwt
aiohttp middleware and helper utils for working with JSON web token.
Stars: ✭ 70 (+218.18%)
Mutual labels:  asyncio
aiounittest
Test python asyncio-based code with ease.
Stars: ✭ 53 (+140.91%)
Mutual labels:  asyncio
sanic-url-shortener
Example of how to use Sanic and asyncpg (PostgreSQL)
Stars: ✭ 16 (-27.27%)
Mutual labels:  asyncio
aiorwlock
Read/Write Lock - synchronization primitive for asyncio
Stars: ✭ 90 (+309.09%)
Mutual labels:  asyncio
rigor
HTTP-based DSL for for validating RESTful APIs
Stars: ✭ 65 (+195.45%)
Mutual labels:  asyncio
fastapi-boilerplate
FastAPI boilerplate for real world production
Stars: ✭ 145 (+559.09%)
Mutual labels:  asyncio
deeppyer
Image deepfryer written in Python.
Stars: ✭ 36 (+63.64%)
Mutual labels:  asyncio
pomp
Screen scraping and web crawling framework
Stars: ✭ 61 (+177.27%)
Mutual labels:  asyncio
python-insteonplm
Python 3 asyncio module for interfacing with Insteon Powerline modems
Stars: ✭ 34 (+54.55%)
Mutual labels:  asyncio
aiodogstatsd
An asyncio-based client for sending metrics to StatsD with support of DogStatsD extension
Stars: ✭ 26 (+18.18%)
Mutual labels:  asyncio
aioprometheus
A Prometheus Python client library for asyncio-based applications
Stars: ✭ 114 (+418.18%)
Mutual labels:  asyncio
aiosqlite3
sqlite3 on asyncio use loop.run_in_executor proxy
Stars: ✭ 21 (-4.55%)
Mutual labels:  asyncio
nardis
A small web framework based on ASGI
Stars: ✭ 14 (-36.36%)
Mutual labels:  asyncio
waio
Is a pretty simple and fully asynchronous framework for WhatsApp Business API written in Python 3.7 with asyncio and aiohttp.
Stars: ✭ 18 (-18.18%)
Mutual labels:  asyncio
Sharingan
We will try to find your visible basic footprint from social media as much as possible - 😤 more sites is comming soon
Stars: ✭ 13 (-40.91%)
Mutual labels:  asyncio
aiolimiter
An efficient implementation of a rate limiter for asyncio.
Stars: ✭ 121 (+450%)
Mutual labels:  asyncio
dvhb-hybrid
A package to mix django and asyncio in one application
Stars: ✭ 45 (+104.55%)
Mutual labels:  asyncio

⚠️ Please note that this project is currently behind the current version of the W3C WoT specifications. Our intention is to get it up to speed and implement the latest Thing Description and Scripting API versions. However, we cannot provide a timeframe for this update.

WoTPy

Travis (.com) Coveralls PyPI

Introduction

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

Inspired by the exploratory implementations located in the thingweb GitHub page.

Features

  • Supports Python 2.7 and Python 3.
  • Fully-implemented WoT interface.
  • Multicast discovery based on mDNS.
  • Asynchronous I/O programming model based on coroutines.
  • Multiple client and server Protocol Binding implementations.

Feature support matrix

Feature Python 2.7 Python 3 Implementation based on
HTTP binding ✔️ ✔️ tornadoweb/tornado
WebSockets binding ✔️ ✔️ tornadoweb/tornado
CoAP binding ✖️ ✔️ chrysn/aiocoap
MQTT binding ✖️ ✔️ beerfactory/hbmqtt
mDNS discovery ✖️ ✔️ jstasiak/python-zeroconf

Couroutine APIs

WoTPy is based on the Tornado Framework. Users therefore have two different API options to write code based on coroutines:

  • Users on Python 3 may use the native asyncio module. This is, in fact, the recommended approach. It should be noted that Tornado on Python 3 acts basically as a wrapper around asyncio.
  • Users on Python 2.7 are restricted to writing Tornado coroutines (asyncio is not available on Python 2.7).

Installation

pip install wotpy

Development

To install in development mode with all the test dependencies:

pip install -U -e .[tests]

To run the tests in all supported environments:

WOTPY_TESTS_MQTT_BROKER_URL=mqtt://broker-url tox

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 2.7 :: OK
Python 3.6 :: OK
Python 3.7 :: OK
Python 3.8 :: OK
Python 3.9 :: OK

Docs

Move to the docs folder and run:

make html

If you attempt to build the docs on a non-Linux platform or with Python 2.7 _autosummary will complain about being unable to import the unsupported modules (e.g. MQTT on Python 2.7). In this case the docs will be missing the sections regarding unsupported features.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].