semvec/pypi-packages huggingface dataset:
vacuum-map-parser-xiaomi 0.1.3
Functionalities for Xiaomi vacuum map parsing
License: Apache-2.0
Requires Python: <4.0,>=3.11

[![GitHub Latest Release][releases_shield]][latest_release] 
[![PyPI][pypi_releases_shield]][pypi_latest_release]
[![PyPI - Downloads][pypi_downloads_shield]][pypi_downloads]

[latest_release]: https://github.com/aronkahrs-us/Python-package-vacuum-map-parser-xiaomi/releases/latest
[releases_shield]: https://img.shields.io/github/v/release/aronkahrs-us/Python-package-vacuum-map-parser-xiaomi

[pypi_latest_release]: https://pypi.org/project/vacuum-map-parser-xiaomi/
[pypi_releases_shield]: https://img.shields.io/pypi/v/vacuum-map-parser-xiaomi

[pypi_downloads]: https://pepy.tech/project/vacuum-map-parser-xiaomi
[pypi_downloads_shield]: https://static.pepy.tech/badge/vacuum-map-parser-xiaomi

# Vacuum map parser - Xiaomi

Map data parser that can be used to parse maps generated by Xiaomi vacuums (based on map data parser for Ijai by maksp86).

## Installation

```shell
pip install vacuum-map-parser-xiaomi
```

## Usage

```python
from vacuum_map_parser_base.config.color import ColorsPalette
from vacuum_map_parser_base.config.drawable import Drawable
from vacuum_map_parser_base.config.image_config import ImageConfig
from vacuum_map_parser_base.config.size import Sizes
from vacuum_map_parser_base.config.text import Text
from vacuum_map_parser_xiaomi.map_data_parser import XiaomiMapDataParser

palette: ColorsPalette = ColorsPalette()
sizes: Sizes = Sizes()
drawables: list[Drawable] = [Drawable.PATH, Drawable.CHARGER]
image_config: ImageConfig = ImageConfig()
texts: list[Text] = []
raw_map: bytes = b''

parser = XiaomiMapDataParser(palette, sizes, drawables, image_config, texts)

unpacked_map = parser.unpack_map(raw_map, 
                                 wifi_sn='******SD**********', 
                                 owner_id='**********', 
                                 device_id='**********', 
                                 model='xiaomi.vacuum.***', 
                                 device_mac='**:**:**:**:**:**')
parsed_map = parser.parse(unpacked_map)
```
  
## Supported vacuums:
- xiaomi.vacuum.e101gb
- xiaomi.vacuum.ov71gl
- xiaomi.vacuum.ov31gl

*If you got another vacuum to work, please tell us*

## Special thanks

The code of this library is based on map data parser for Ijai by [@maksp86](https://github.com/maksp86)