semvec/pypi-packages huggingface dataset:
pyutilix 0.1.3
A small Python utility library including Clamped and other functions.
License: MIT
Requires Python: >=3.8

# PyUtilx

**PyUtilx** — a lightweight Python library with useful utilities and extended variable types.  
Designed for convenience and less routine in logical operations.

## Features

- **Clamped** — a numeric type with value limits (`min`, `max`) and an optional looping mode (`loop=True`).  
  Supports all major operators (`+`, `-`, `*`, `/`, `%`, `**`) and safely handles boundary overflows.

- **to_base()** — converts numbers between numeral systems (up to base 36).  
  Example: `to_base("ZZ", 36, 10)` → `1295`.

- **nearest() / closest() / nrst()** — finds the closest value from a list.

- **clamp()** — clamps a number between two bounds.

- **reverse()** — reverses a string or number (sign preserved).

- **sign()** — returns the sign of a number: `1`, `-1` or `0`.

## Example

```python
from pyutilx import Clamped, to_base, reverse

x = Clamped(5, 0, 10)
x += 8
print(x)  # 10

y = Clamped(9, 0, 10, loop=True)
y += 3
print(y)  # 1

print(to_base("ZZ", 36, 10))  # 1295
print(reverse(-123))  # -321
```

## Why PyUtilx?
PyUtilx isn’t just a collection of random utilities — it’s an attempt to expand Python with **missing data types**  
and simple yet powerful tools that make your code cleaner and more logical.  
`Clamped` is just the beginning.
termoweb 0.1.3
Python client library for controlling Termo thermostats via web interface
License: MIT
Requires Python: >=3.9
Keywords: thermostat, termo, home-automation, temperature-control

# Termoweb

Python client library for controlling Termo thermostats via web interface.

## Installation

```bash
pip install termoweb
```

## Usage

```python
from termoweb import Termoweb

# Initialize client with your credentials
client = Termoweb(email="your_email@example.com", password="your_password")

# Connect to the service
client.connect()

# Get all heaters/radiators
heaters = client.get_devices()
print(heaters)

# Set heater temperature and mode
client.set_heater(heater_id=1, mode="heat", target_temp=21.5)
```

## API Reference

### `Termoweb(email, password)`
Initialize the client with your Termoweb credentials.

### `connect()`
Authenticate and establish connection to the Termoweb service.

### `get_devices()`
Returns a dictionary of all connected heaters with their current settings:
```python
{
    1: {
        "name": "Living Room",
        "mode": "heat",
        "target_temp": 21.0,
        "room_temp": 20.5
    }
}
```

### `set_heater(heater_id, mode, target_temp)`
Set the mode and target temperature for a specific heater.

## Exception Handling

The library includes custom exceptions:
- `TermowebError`: Base exception
- `AuthenticationError`: Authentication failures
- `APIError`: API request failures

## Supported Devices

| Device Type       | Supported |
|-------------------|-----------|
| Heaters/Radiators | ✅        |
| Thermostats       | ❌        |
| Power Monitors    | ❌        |