semvec/pypi-packages huggingface dataset:
tracked-mapping 0.1.0
Dict/list wrappers that track key access for reporting unconsumed data
Requires Python: >=3.10

# tracked-mapping

Dict and list wrappers that track key access for reporting unconsumed data.

Wrap a parsed JSON/YAML/TOML structure in `TrackedDict`, read what you need
through normal dict access, then call `unaccessed()` to get dotted paths for
every key that was never touched.

## Install

```bash
pip install tracked-mapping
```

## Usage

```python
import json
from tracked_mapping import TrackedDict

with open("config.json") as f:
    data = TrackedDict(json.load(f))

name = data["project"]["name"]
version = data["project"]["version"]

for path in data.unaccessed():
    print(f"  unhandled: {path}")
```

## API

### `TrackedDict(data: dict, _path: str = "")`

- `d[key]` / `d.get(key, default)` — read access; marks `key` as accessed
- `key in d`, `len(d)`, `bool(d)`, `iter(d)` — standard container ops (do **not** mark accessed)
- `d.keys()` — returns keys (does **not** mark accessed)
- `d.values()` / `d.items()` — iterate with wrapping; marks all keys accessed
- `d.raw` — the underlying plain `dict`
- `d.mark_accessed(*keys)` — explicitly mark keys
- `d.mark_all_accessed()` — mark every key at this level
- `d.unaccessed()` — sorted list of dotted paths for all unaccessed keys, recursively
- `d.accessed_keys()` — set of keys accessed at this level

Nested dicts are automatically wrapped in `TrackedDict`, nested lists in `TrackedList`.

### `TrackedList(data: list, _path: str = "")`

- `lst[i]`, `len(lst)`, `bool(lst)`, `iter(lst)` — standard access
- `lst.raw` — the underlying plain `list`
- `lst.unaccessed()` — collects unaccessed paths from wrapped children

## How it works

When you access a key via `[]` or `.get()`, `TrackedDict` records that key.
Nested dicts and lists are lazily wrapped on first access so their keys are
tracked too. After your parser finishes, `unaccessed()` walks the tree and
returns dotted paths (e.g. `"server.timeout"`, `"users[0].email"`) for
anything never read.

This catches both parser omissions (data present but ignored) and unknown
user-supplied fields — without maintaining a separate list of expected keys.

## License

MIT
iflow-mcp_thangnch-miai_mcp 0.1.0
Demo of building and integration MCP Server
Requires Python: >=3.11

# MiAI_MCP
Demo of building and integration MCP Server

Video link:  https://youtu.be/6rDUTy87Xxg

#MìAI <br>
Fanpage: http://facebook.com/miaiblog<br>
Group trao đổi, chia sẻ: https://www.facebook.com/groups/miaigroup<br>
Website: http://miai.vn<br>
Youtube: http://bit.ly/miaiyoutube<br>
python-qube-heatpump 1.5.1
Async Modbus client for Qube Heat Pumps
Requires Python: >=3.12

# Python Qube Heat Pump Client

Asyncio client for Qube heat pumps via Modbus TCP.

## Installation

```bash
pip install python-qube-heatpump
```

## Usage

```python
import asyncio
from python_qube_heatpump import QubeClient

async def main():
    client = QubeClient("192.168.1.100", port=502, unit_id=1)
    await client.connect()

    state = await client.read_state()
    print(f"Outside temp: {state.temp_outside}°C")
    print(f"Supply temp: {state.temp_supply}°C")
    print(f"DHW temp: {state.temp_dhw}°C")

    await client.disconnect()

asyncio.run(main())
```

## Features

- **Async Modbus TCP client** using pymodbus
- **Entity definitions** for sensors, binary sensors, and switches
- **FLOAT32 decoding** with big endian (ABCD) byte order
- **Type-safe dataclasses** for entity definitions

## Entity Definitions

The library provides pre-defined entity definitions for all Qube Modbus registers:

```python
from python_qube_heatpump.entities import SENSORS, BINARY_SENSORS, SWITCHES

# Access entity definitions by key
temp_supply = SENSORS["temp_supply"]
print(f"Address: {temp_supply.address}, Unit: {temp_supply.unit}")
```

## Vendor Documentation

The official Modbus register documentation from HR-Energy is available at:
- [docs/202506_modbus-lijst-qube.pdf](docs/202506_modbus-lijst-qube.pdf) (included in this repo)
- [HR-Energy website](https://www.hr-energy.com/media/m4gavc0p/202506_modbus-lijst-qube.pdf)

## Related Projects

- [qube_heatpump](https://github.com/MattieGit/qube_heatpump) - Home Assistant HACS integration using this library

## License

MIT License