Metadata-Version: 2.4
Name: mg-ismart-india-client
Version: 0.1.1
Summary: Python client for the MG iSMART India TAP/gateway API
Project-URL: Homepage, https://github.com/john-lazarus/mg-ismart-india-client
Project-URL: Issues, https://github.com/john-lazarus/mg-ismart-india-client/issues
Project-URL: Source, https://github.com/john-lazarus/mg-ismart-india-client
Author: John Lazarus
License-Expression: MIT
License-File: LICENSE
Keywords: home-assistant,india,ismart,mg,saic
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.9
Requires-Dist: asn1tools>=0.167.0
Requires-Dist: pycryptodome>=3.20.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# MG iSMART India Client

Python client for the MG iSMART India TAP/gateway API.

This package contains the protocol/client layer used by the MG iSMART India Home Assistant work. It is intentionally separate from Home Assistant so it can be tested and released independently.

## Install

```bash
pip install mg-ismart-india-client
```

## Basic use

```python
import aiohttp
from mg_ismart_india_client import MgIndiaClient, hash_control_pin

async with aiohttp.ClientSession() as session:
    client = MgIndiaClient(
        session,
        phone="9876543210",
        password="your-password",
        vin="YOURVINHERE",
        pin_hash=hash_control_pin("1234"),
    )

    await client.login()
    vehicles = await client.vehicles()
    status = await client.status()
```

Control methods require a configured PIN hash. The raw 4-digit control PIN is not stored by the client.

## Development

```bash
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
pytest -q
ruff check src tests
```

## License

MIT License. Copyright (c) 2026 John Lazarus.
