Metadata-Version: 2.5
Name: wellbyte
Version: 0.7.0
Summary: Official Wellbyte Python SDK — thin HTTP client with 202 auto-poll
Project-URL: Homepage, https://www.wellbyte.net
Project-URL: Documentation, https://www.wellbyte.net/zh/docs/sdk
Project-URL: Documentation (en), https://www.wellbyte.net/en/docs/sdk
Author: Wellbyte
License-Expression: MIT
License-File: LICENSE
Keywords: api,mcp,sdk,social-data,wellbyte
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown


# wellbyte (Python SDK)

Official Python client for the Wellbyte `/v1` API.

**Not published to PyPI yet.** The public index does not serve this package. Until release, call the API with `requests` or `httpx` and `Authorization: Bearer`, or install a wheel built from this directory.

## Install (local wheel)

```bash
cd packages/sdk-python
python -m build
pip install dist/wellbyte-0.7.0-py3-none-any.whl
```

## Quick start

```python
from wellbyte import WellbyteClient

with WellbyteClient(api_key="dg_live_xxx", base_url="https://api.wellbyte.net") as client:
    # Sync call — HTTP 202 with job_id is polled by default
    note = client.call("/v1/xiaohongshu/note/detail", {"note_id": "demo_note_ok"})
    print(note)

    hits = client.search_endpoints(q="note", platform="xiaohongshu")

    job = client.create_job({
        "endpoint": "xiaohongshu.note.detail",
        "params": [{"note_id": "demo_note_ok"}],
    })
```

Every request sends `Authorization: Bearer …` and `User-Agent: wellbyte-sdk-py/0.7.0`.

## 202 auto-poll

When the gateway accepts a large sync request as a job (`HTTP 202` + `job_id`),
`call` / `create_job` poll `GET /v1/jobs/{id}` until a terminal status.

```python
WellbyteClient(
    api_key="dg_live_…",
    auto_poll=True,          # default
    poll_interval_ms=1500,
    poll_timeout_ms=300_000,
)
```

Set `auto_poll=False` to receive the raw 202 envelope.

## Auth

```http
Authorization: Bearer dg_live_…
```

## Build

PyPI upload is not part of this release. `python -m build` from this directory writes both artifacts:

- `dist/wellbyte-0.7.0-py3-none-any.whl`
- `dist/wellbyte-0.7.0.tar.gz`


