Metadata-Version: 2.4
Name: opsd
Version: 0.1.0
Summary: Python client library for the Opsd API
Project-URL: Homepage, https://opsd.sh
Project-URL: Repository, https://github.com/opsd-sh/opsd-python
Project-URL: Issues, https://github.com/opsd-sh/opsd-python/issues
Author: Opsd contributors
License-Expression: MIT OR Apache-2.0
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Keywords: api,client,opsd,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == 'dev'
Requires-Dist: pytest<10,>=8; extra == 'dev'
Requires-Dist: ruff<1,>=0.12; extra == 'dev'
Description-Content-Type: text/markdown

# Opsd Python library

`opsd` is the asynchronous Python client library for the Opsd API. It provides
a small typed wrapper around the current public endpoints, including the
hello-world sandbox route and the user endpoints.

## Installation

```console
python -m pip install opsd
```

## Usage

The default client targets the production API at `https://api.opsd.sh/v1/`.
OAuth access tokens and API keys both use the HTTP Bearer scheme and are
redacted from object representations.

```python
import asyncio

from opsd import ApiCredential, OpsdClient


async def main() -> None:
    credential = ApiCredential("secret")
    async with OpsdClient(credential) as client:
        response = await client.hello_world()
        print(response.message)


asyncio.run(main())
```

For local development, tests, or non-production deployments, pass `base_url`
to `OpsdClient`. Successful responses are returned as typed dataclasses.
Non-2xx responses raise `ApiError` when the server returns problem details,
or `UnexpectedResponseError` for an unrecognised response.

## Development

```console
python -m pip install -e '.[dev]'
ruff check .
ruff format --check .
pytest
python -m build
```

## License

Licensed under either the Apache License, Version 2.0 or the MIT license, at
your option.
