Metadata-Version: 2.4
Name: yunmao
Version: 0.1.3
Summary: Official Python SDK for Yunmao APIs
Author: Yunmao
License: MIT
Keywords: api,sdk,yunmao
Requires-Python: >=3.9
Requires-Dist: httpx<1,>=0.26
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# Yunmao Python SDK

Official Python SDK for Yunmao APIs.

## Install

```bash
pip install yunmao
```

## Quick Start

```python
from yunmao import YunmaoClient

client = YunmaoClient(
    api_key="<YOUR_API_KEY>",
    base_url="<YOUR_BASE_URL>",
)
```

Pass the appropriate `base_url` for your environment.

For API methods, supported parameters, and full examples, see the official Yunmao developer documentation.

## Errors

```python
from yunmao import YunmaoAPIError

try:
    # Call a Yunmao API method here.
    pass
except YunmaoAPIError as error:
    print(error.status_code)
    print(error.code)
    print(error.message)
    print(error.request_id)
```

The SDK preserves:

- `status_code`: HTTP status
- `code`: Yunmao business error code
- `message`: server message
- `request_id`: request id when the server provides it
- `response_body`: parsed raw response body

## Test

```bash
python -m venv .venv
.venv/bin/python -m pip install -e ".[test]"
.venv/bin/python -m pytest
```

Automated tests use mocks and do not call paid APIs.
