semvec/pypi-packages huggingface dataset:
table-metrics 0.1.1
Python library implementing GriTS and TEDS
Requires Python: >=3.13

# Table Metrics
**Table Metrics** is a Python library implementing evaluation metrics for table extraction and table structure recognition tasks.

Currently supported metrics:

- **GriTS** - Grid Table Similarity ([arXiv:2203.12555](https://arxiv.org/abs/2203.12555))

  - GriTS_Top – topology / structure similarity

  - GriTS_Con – cell content similarity

  - GriTS_Loc – spatial (layout) similarity using bounding boxes

- **TEDS** – Tree Edit Distance-based Similarity ([arXiv:2208.00385](https://arxiv.org/abs/2208.00385))

## Installation

```sh
pip install table-metrics
```

## Quick Start
```python
from docling.document_converter import DocumentConverter
from table_metrics import (
    grits_top_score,
    grits_con_score,
    teds_score,
)


converter = DocumentConverter()
doc = converter.convert("your.pdf")

extracted_html_table = doc.document.tables[0].export_to_html()
true_html_table = (
    "<table><tr><td>We</td><td>love</td><td>open</td><td>source</td></tr></table>"
)

print("GriTS_Top:", grits_top_score(true_html_table, extracted_html_table))
print("GriTS_Con:", grits_con_score(true_html_table, extracted_html_table))
print("TEDS:", teds_score(true_html_table, extracted_html_table))
```

## License
[MIT](https://choosealicense.com/licenses/mit/)
pyeconet 0.2.1
Interface to the unofficial EcoNet API
Requires Python: <4,>=3.8
Keywords: econet, rheem, api

# pyeconet
Python3 interface to the unofficial EcoNet API.

> [!NOTE]
> I no longer have a device connect to the Rheem cloud due to migrating to a fully local control option 
> https://github.com/esphome-econet/esphome-econet
> If anyone is interested in taking over ownership for this project please open an issue to discuss.

> [!NOTE]
> This isn't using an official EcoNet API therefore this library could stop working at any time, without warning.



```python
import asyncio
import logging
import time
import getpass

from pyeconet import EcoNetApiInterface
from pyeconet.equipment import EquipmentType
from pyeconet.equipment.water_heater import WaterHeaterOperationMode

logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)


async def main():
    email = input("Enter your email: ").strip()
    password = "" #getpass.getpass(prompt='Enter your password: ')
    api = await EcoNetApiInterface.login(email, password=password)
    all_equipment = await api.get_equipment_by_type([EquipmentType.WATER_HEATER, EquipmentType.THERMOSTAT])
    #api.subscribe()
    #await asyncio.sleep(5)
    for equip_list in all_equipment.values():
        for equipment in equip_list:
            print(f"Name: {equipment.device_name}")
    #        print(f"Set point: {equipment.set_point}")
    #        print(f"Supports modes: {equipment._supports_modes()}")
    #        print(f"Operation modes: {equipment.modes}")
    #        print(f"Operation mode: {equipment.mode}")
            #await equipment._get_energy_usage()
            #equipment.set_set_point(equipment.set_point + 1)
            #equipment.set_mode(OperationMode.ELECTRIC_MODE)
    #await asyncio.sleep(300000)
    #api.unsubscribe()

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
```
atomic_lru 0.0.2
Thread-safe, dependency-free in-memory LRU storage library for Python 3.12+ (with optional TTL)
Requires Python: >=3.12

# Atomic LRU

## What is this?

This is a **thread-safe** and **dependency-free** **in-memory** **LRU storage** Python 3.12+ library with optional Time To Live (TTL).

You can define:

- **limits** (`max-items` or `max-size-in-bytes`)
- **TTL expiration** (globally or per item)

to prevent the storage from growing too big.

You will get an automatic **LRU eviction** of the least recently used items when the limits are reached.

### High level API

The main use-case is to use it as a **cache** for your data. You store any kind of data type which will be **automatically serialized** to bytes. [^1]

```python
from atomic_lru import CACHE_MISS, Cache

# Create a Cache object instance (with a size limit of 1MB)
# (this object is thread-safe, so you can use it from multiple threads)
cache = Cache(size_limit_in_bytes=1_000_000, default_ttl=3600)

# Let's store something (a dictionnary here) in the cache with a custom TTL
cache.set("user:123", {"name": "Alice", "age": 30}, ttl=60)

# ...

# Let's retrieve it
user = cache.get("user:123")

if user is not CACHE_MISS:
    # cache hit
    print(user["name"])

```

### Low level API

But you can use it at a lower level to store any kind of data type without serialization. In that case, you will loose the `max-size-in-bytes` feature. See below for an example.

## Features

- Thread-Safe
- (optional) TTL expiration *(globally or per item)*
- (optional) Total size limit *(in bytes)* [^2]
- (optional) Max items limit
- Automatic LRU eviction *(when the limits are reached)*
- Full-typing support
- High level `Cache` API **with** automatic serialization/deserialization [^1]
- Low level `Storage` API **without** serialization/deserialization *(store only references to given objects)*

### Low level API example

```python
from atomic_lru import CACHE_MISS, Storage


class ExpensiveObject:
    """An expensive object that is not serializable."""

    pass


# Create a Storage object instance to store ExpensiveObject instances
# (this object is thread-safe, so you can use it from multiple threads)
storage = Storage[ExpensiveObject](max_items=100, default_ttl=3600)

# Create and store an ExpensiveObject instance
value = ExpensiveObject()
storage.set("key1", value, ttl=60)

# ...

# Let's retrieve it
obj = storage.get("key1")

if obj is not CACHE_MISS:
    # cache hit
    assert isinstance(obj, ExpensiveObject)
    assert id(obj) == id(value)  # this is the same object instance

```

[^1]: By default, `pickle` is used for serialization/deserialization but you can provide your own serializer/deserializer if you want to use a different format.
[^2]: This feature is only available when using the high level `Cache` API.

## DEV

This library is managed with `uv` and a `Makefile`. Execute:

- `uv sync` to create the virtual environment
- `make lint` to lint the code (style, checks, types, architecture) and fix obvious things
- `make test` to execute unit tests
- `make doc` to generate the documentation