Metadata-Version: 2.5
Name: infrawrench-sdk
Version: 1.37.0
Summary: Generated Python client for the Infrawrench API (v1.37.0).
Project-URL: Homepage, https://infrawrench.com/docs/team-and-billing/client-sdks
Project-URL: Repository, https://github.com/Infrawrench/Infrawrench
Project-URL: Issues, https://github.com/Infrawrench/Infrawrench/issues
Author-email: Infrawrench LLC <astrid@infrawrench.com>
Maintainer-email: Astrid Gealer <astrid@infrawrench.com>
License: MIT
License-File: LICENSE
Keywords: api-client,cloud,devops,infrastructure,infrawrench,openapi,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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 :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# infrawrench-sdk

Generated Python client for the Infrawrench API (API version `1.37.0`).

**Do not edit this package by hand** — it is regenerated from `openapi.json` and
is not checked into the repository. Run
`pnpm --filter @infrawrench/web generate:sdk` to rebuild it; the generator lives
in [`app/packages/web/scripts/sdk`](https://github.com/Infrawrench/Infrawrench/tree/main/app/packages/web/scripts/sdk).

## Install

```sh
pip install infrawrench-sdk
```

Requires Python 3.9+ and nothing else: the client is built on
`urllib.request` and `json` from the standard library.

## Usage

```python
import os

from infrawrench_sdk import APIV1Client, ApiError

client = APIV1Client(
    api_key=os.environ["INFRAWRENCH_API_KEY"],
    org_id=os.environ["INFRAWRENCH_ORG_ID"],
)

try:
    accounts = client.accounts.list()
except ApiError as error:
    print(error.status, error.code, error.body)
```

Calls are namespaced to mirror the URL structure, so
`POST /api/org/{orgId}/accounts/{id}/sync` is `client.accounts.sync(id=...)`.
Every argument is keyword-only. Set `org_id` once on the client and every
org-scoped call can omit it; pass `org_id=` on an individual call to
override it there.

Every method also takes `request_options=RequestOptions(...)` for per-call
`headers` and `timeout`. Non-2xx responses raise `ApiError`, which carries
`status`, the parsed `body`, and the machine-readable `code` when the API sends
one.

## Types

Models are `TypedDict`s, so responses are ordinary dicts and request bodies can
be written as literals:

```python
client.resources.secret_versions.add(
    plugin_id="aws",
    type_id="s3_bucket",
    body={"resourceId": resource_id, "value": "..."},
)
```

The package ships `py.typed` (PEP 561), so mypy and pyright check those calls
against the spec without a stub package.

## Scope

This package covers the published API surface only. Operations marked
`x-internal` in the spec — the admin surface, webhook receivers, desktop sync,
push registration, and the browser auth redirects — are not generated.

## License

MIT — see [`LICENSE`](./LICENSE). Copyright (c) 2026 Infrawrench LLC.

Note that this client is more permissively licensed than the service it talks
to: the Infrawrench source is BUSL-1.1, but the generated clients are MIT
so you can link one into your own software without inheriting those terms.

Issues: <https://github.com/Infrawrench/Infrawrench/issues>
