Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.9.0rc1

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.9.0rc1
File Size Uploaded Provenance Actions
pytewke-0.9.0rc1.tar.gz 23.3 MB With provenance Details for pytewke-0.9.0rc1.tar.gz

Built distribution (wheel)

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

Total release size: 23.4 MB

Release files / pytewke-0.9.0rc1.tar.gz

Download URL pytewke-0.9.0rc1.tar.gz
Size 23.3 MB
Tags Source
SHA-256 checksum
How to use checksums
399b068095ce37e47210b2261808fb1cea521995873a5c3d492a3589d20ed23f
BLAKE2b-256 checksum
How to use checksums
3cfd114953d148d5c38a97c98facc16d9067f84f0388a47a52fd3fcba435ae2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.10

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 Nov 3, 2026.

Transparency log

Release files / pytewke-0.9.0rc1-py3-none-any.whl

Download URL pytewke-0.9.0rc1-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d082a9d87034cfb52ec1f7d6f986b905a360094916470eaa8c3c06e4dc057cc
BLAKE2b-256 checksum
How to use checksums
a11f38a22dda63cda0aa13fcd2a828389d9000c0bdedfa158e150b7311f3c93d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.10

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 Nov 3, 2026.

Transparency log

Security for pytewke 0.9.0rc1

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 pytewke-0.9.0rc1.tar.gz

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 Nov 3, 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