Metadata-Version: 2.5
Name: nerova-sdk
Version: 0.3.0b2
Summary: Server-side Python client for the Nerova stable tenant-v1 API.
Project-URL: Homepage, https://docs.nerovasystems.com
Project-URL: Documentation, https://docs.nerovasystems.com
Author: Nerova Systems
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,bookings,nerova,receptionist
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
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 :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: microsoft-kiota-abstractions<2.0.0,>=1.9.0
Requires-Dist: microsoft-kiota-http<2.0.0,>=1.9.0
Requires-Dist: microsoft-kiota-serialization-form<2.0.0,>=1.9.0
Requires-Dist: microsoft-kiota-serialization-json<2.0.0,>=1.9.0
Requires-Dist: microsoft-kiota-serialization-multipart<2.0.0,>=1.9.0
Requires-Dist: microsoft-kiota-serialization-text<2.0.0,>=1.9.0
Description-Content-Type: text/markdown

# `nerova-sdk`

Server-side Python client for Nerova's dedicated stable `tenant-v1` API. The
typed async client is built from the published `tenant-v1` OpenAPI contract, so
every path, parameter, and model exists because the contract says so.

This package is server-side only: no browser credential flow, no UI, no
persistent credential storage. Never ship an API key to a browser or a mobile
app.

```bash
pip install nerova-sdk==0.3.0b2
```

The distribution name is `nerova-sdk`; the import name is `nerova_sdk`. It needs
Python 3.9 or later and installs its HTTP and serialization runtime libraries as
regular dependencies.

## Versioning

The SDK shares one version line with `@nerova/sdk` and `Nerova.Sdk`
(currently `0.3.0-preview.2`). PyPI requires PEP 440 versions, so a
`-preview.N` suffix is written as `bN`: `0.3.0-preview.2` is `0.3.0b2`, and
`0.3.0-preview.3` will be `0.3.0b3`. A stable release keeps the bare
`X.Y.Z`. Pip skips pre-releases unless you pin one (as above) or pass
`--pre`. The API surface may change before 1.0, so pin the exact version.

## Quickstart

The API has one public host, `https://api.nerovasystems.com`, which is the
client's default base URL. Every API key is a Live key (`nrv_live_`) that reaches
Production; approved platforms start on a free testing allowance. Read the key
from the environment and send it as `Authorization: Bearer <key>`:

```python
import asyncio
import os

from kiota_abstractions.authentication import ApiKeyAuthenticationProvider, KeyLocation
from kiota_http.httpx_request_adapter import HttpxRequestAdapter
from nerova_sdk import NerovaPartnerClient


async def main() -> None:
    value = os.environ["NEROVA_API_KEY"]
    tenant_id = os.environ["TENANT_ID"]

    authentication_provider = ApiKeyAuthenticationProvider(
        KeyLocation.Header, f"Bearer {value}", "Authorization"
    )
    client = NerovaPartnerClient(HttpxRequestAdapter(authentication_provider))

    manifest = await client.api.v1.tenants.by_tenant_id(tenant_id).activation.manifest.get()
    print(manifest.state, manifest.next_allowed_actions)


asyncio.run(main())
```

The client mirrors the URL structure of the API: `client.api.v1.status`,
`client.api.v1.context`, `client.api.v1.tenants`, and
`client.api.v1.tenants.by_tenant_id(id)` for everything under one tenant.
Models live in `nerova_sdk.models`, and request builders in `nerova_sdk.api`.

## Conventions

- Idempotency: send a caller-owned `Idempotency-Key` header on every mutation
  via the request configuration, and reuse the same value when repeating the
  same command. The client performs no automatic retries of mutations:

  ```python
  from kiota_abstractions.base_request_configuration import RequestConfiguration
  from nerova_sdk.models.create_tenant_v1_request import CreateTenantV1Request

  configuration = RequestConfiguration()
  configuration.headers.add("Idempotency-Key", "provision-tenant-your-crm-id-123")
  created = await client.api.v1.tenants.post(
      CreateTenantV1Request(display_name="Demo Salon", external_reference="your-crm-id-123"),
      configuration,
  )
  ```

- Errors follow RFC 9457 problem details: the request adapter raises the
  deserialized `nerova_sdk.models.problem_details.ProblemDetails` (an `APIError`)
  with `response_status_code` and `response_headers` attached; the stable `code`
  and `correlationId` arrive in `additional_data`. Branch on those fields, never
  on message text.
- Enums are open string sets; treat unknown values as forward compatibility.
- List endpoints paginate with `unixms|id` cursors: pass `cursor` back through
  the query parameters until `next_cursor` is `None`.

## Documentation and support

Guides, the API reference, and support contacts are on
[docs.nerovasystems.com](https://docs.nerovasystems.com). Start with the
[quickstart](https://docs.nerovasystems.com/getting-started/quickstart) and the
[SDK overview](https://docs.nerovasystems.com/sdks).
