Skip to main content

ci

pytewke

A Python client for local CoAP communications with Tewke devices

This library is under development

Usage

Install

pip install pytewke

Examples

Discovering Scenes and Targets

import asyncio
from pprint import pprint

from pytewke import Tap
from pytewke.error import PyTewkeDiscoveryError


async def test_device():
    """Test Tap Panel device."""
    # Replace with your device's IP address
    host = "w.x.y.z"

    try:
        async with Tap(host) as tap:
            print("Targets:")
            targets = await tap.get_targets()
            pprint(targets)

            print("Scenes:")
            scenes = await tap.get_scenes()
            pprint(scenes)
    except PyTewkeDiscoveryError as err:
        print(f"Error connecting to {host}, error: {repr(err)}")


if __name__ == "__main__":
    asyncio.run(test_device())

Example script

The repository includes an example script to quickly try it out.

Uncomment the relevant lines in example.py to run different examples like discovering resources, reading config, observing state, etc.

python3 example.py

Note: if you have not installed pytewke but have cloned the library instead, you will need to add the src folder to your PYTHONPATH:

PYTHONPATH="${PYTHONPATH}:/path/to/pytewke/src" python3 example.py

Development

Requirements

  • aiocoap
  • cbor2
  • pydantic

Note: Python versions older than 3.12 have not been tested.

Development requirements

Run the following command inside this folder

pip install .[dev]

Note: You will need to add the src folder to your PYTHONPATH when using the example script or while running tests.

Metadata

Release files for pytewke 0.7.1

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

Source distribution (sdist)

Source distribution for pytewke 0.7.1
File Size Uploaded
pytewke-0.7.1.tar.gz 27.6 MB Details

Built distribution (wheel)

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

Total release size: 27.6 MB

Release files / pytewke-0.7.1.tar.gz

Download URL pytewke-0.7.1.tar.gz
Size 27.6 MB
Tags Source
SHA-256 checksum
How to use checksums
85f5c8e942b663b1b699ffe715a33fddd3bc8dece24424c8e8370aac0047a9da
BLAKE2b-256 checksum
How to use checksums
dec1f5bfb2887c9feb6dce54998f5b268739528f2b16739aff19ac68d291b936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

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 GitLab CI/CD, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / pytewke-0.7.1-py3-none-any.whl

Download URL pytewke-0.7.1-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ca3cee1386c5fd964b6c56ff18cc83bddccc99aa8c4f296ce94729a6553cfc5
BLAKE2b-256 checksum
How to use checksums
7f82e2ed6d394d117af133e0244db1e29c975f844a66c3587e2139e59af4d56f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

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 GitLab CI/CD, verified by PyPI on Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

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