Skip to main content

A Python client for Themo smart thermostats

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythemo-0.3.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythemo-0.3.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pythemo-0.3.1.tar.gz.

File metadata

  • Download URL: pythemo-0.3.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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}

File hashes

Hashes for pythemo-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c7a4f5b7536d4d1377e5c47a7f182994988ca4db77ae2c9b73932c0cf7495c92
MD5 9339bd733e168859799d329914eff86e
BLAKE2b-256 aa89d4a03bfb5ab16b016d9b6552b2ccfec5327073336c16f2d888560b52019b

See more details on using hashes here.

File details

Details for the file pythemo-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pythemo-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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}

File hashes

Hashes for pythemo-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f29ded33bb27e9470bc43dcbaf4f57ad89cf00b9e298fcd2088c11c710e50c43
MD5 c2cffb7349062ec215277800cc195073
BLAKE2b-256 0e872320dba311d577d9d650d5423d17f8297f5398b8df98eb8b6fcc1aec3047

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page