Metadata-Version: 2.4
Name: robot-wrapper-sdk
Version: 0.2.1
Summary: Robot Platform API SDK
Author-email: GH Robot Platform Team <team@ghrobot.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.1

# Robot Platform SDK (Python)

**Robot Platform** provides a clean‑architecture, DDD‑compliant Python SDK for interacting with the robot management backend. The SDK ships with both synchronous and asynchronous clients, automatic authentication, and token‑refresh middleware.

---

## 📦 Installation
```sh
pip install robot-wrapper-sdk
```

---

## 🚀 Quick start
```python
from robot_sdk import RobotPlatformModule

# Auto‑configuration via environment variables (recommended)
#   ROBOT_PLATFORM_BASE_URL
#   ROBOT_PLATFORM_APP_ID
#   ROBOT_PLATFORM_APP_SECRET

sdk = RobotPlatformModule()  # reads env vars automatically

# Synchronous call example
robot = sdk.robot_usecase.get_robot_profile("2029943774539935744")
print(robot.platform)

# Asynchronous call example
import asyncio

async def async_demo():
    async_sdk = await RobotPlatformModule.async_init()
    robot = await async_sdk.robot_usecase.get_robot_profile_async("2029943774539935744")
    print(robot.platform)

asyncio.run(async_demo())
```

---

## 📚 Documentation
The full API reference and usage guide live in the repository:
- **Guide**: [`docs/guide.md`](docs/guide.md) – step‑by‑step walkthrough of all use‑cases.
- **API reference** is generated from type‑hints and can be inspected via `help(RobotPlatformModule)`.

---

## 💡 Examples
The `examples/` directory contains ready‑to‑run scripts that demonstrate common scenarios:
- [`examples/auth_flow.py`](examples/auth_flow.py) – login, token refresh, and error handling.
- [`examples/robot_profile.py`](examples/robot_profile.py) – fetch robot details synchronously.
- [`examples/async_robot_profile.py`](examples/async_robot_profile.py) – the same operation with `asyncio`.

Run any example directly:
```sh
python examples/robot_profile.py
```

---

## 🛠️ Build & publish (maintainer guide)
```sh
# Create a clean virtual environment
make venv

# Install build tools
make install

# Build source and wheel distributions
make build

# Publish to PyPI (requires twine and valid credentials)
make publish
```
The `Makefile` lives in the SDK root and abstracts the above commands.

---

## 📄 License
MIT License – see the bundled `LICENSE` file.

---

*This README is rendered on PyPI, so all relative links (`docs/`, `examples/`) resolve to the files shipped in the source distribution, allowing developers to browse the documentation and example code directly from the package page.*
