Skip to main content

pythemo - Python Themo API Client

The pythemo repository provides a Python client for interacting with the Themo API. This library allows you to authenticate, fetch, and control devices associated with your Themo account.

Features

  • Authentication: Authenticate with the Themo API using your username and password.
  • Device Information: Fetch all devices associated with your account.
  • Control Devices: Control device attributes like lights, temperature, mode, and schedules.

File Descriptions

models.py

The models.py file contains the Device class which represents a Themo device. This class provides:

  • Initialization of the device with its ID and token.
  • Methods to fetch and update the device state and attributes.
  • Methods to control the device, including setting lights, temperature, mode, and schedules.

client.py

The client.py file contains the ThemoClient class which is responsible for:

  • Authenticating the user and obtaining the access token.
  • Fetching the client ID.
  • Fetching all devices associated with the user's account.
  • Closing the client session.

Usage

To use this library, you need to:

  1. Create an instance of the ThemoClient class using your Themo account credentials (username and password).
  2. Call the authenticate() method to obtain the access token.
  3. Fetch devices using the get_all_devices() method.
  4. For each device, you can fetch and update its state, control its attributes, and manage its schedules using methods provided in the Device class.

Dependencies

  • httpx: A fully featured HTTP client for Python 3.

Contributions

Contributions to the pythemo repository are welcome. Please ensure that you follow the coding conventions and write tests for any new features or changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Release files for pythemo 0.3.2

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

Source distribution (sdist)

Source distribution for pythemo 0.3.2
File Size Uploaded
pythemo-0.3.2.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 16.7 kB

Release files / pythemo-0.3.2.tar.gz

Download URL pythemo-0.3.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b936cbebf4bde0476d75f4b5aae52c084e52db181101b1dc4a5619de732df249
BLAKE2b-256 checksum
How to use checksums
e84fe4bbd77e29d973e1b90f377ebc3742bec0460b577516f8bf1ce5e7290fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pythemo-0.3.2-py3-none-any.whl

Download URL pythemo-0.3.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c30d16eb815187976c298a9f2629a67c45ad111194d9183eee143999069a67d
BLAKE2b-256 checksum
How to use checksums
c6b2a9b108be074f90f2cec1c8113dd53feb4c29e798af2cc4485aeba2168276
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.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