Metadata-Version: 2.5
Name: darkhunt-api
Version: 0.1.9
Summary: Python client for the Darkhunt public API — workflow and guardrail management.
Project-URL: Homepage, https://docs.darkhunt.ai
Project-URL: Documentation, https://docs.darkhunt.ai/category/api-reference
Author: Darkhunt Limited
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai-security,api,darkhunt,guardrails,openapi,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software 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: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: pydantic>=2.11
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: typing-extensions>=4.7.1
Requires-Dist: urllib3<3.0.0,>=1.25.3
Description-Content-Type: text/markdown

# darkhunt-api

Python client for the [Darkhunt](https://docs.darkhunt.ai) public API.

Generated from the public OpenAPI contracts. The full API reference, including
request and response schemas, is at
[docs.darkhunt.ai](https://docs.darkhunt.ai/category/api-reference).

## Install

```bash
pip install darkhunt-api
```

## Usage

Each service is a submodule with its own client, configuration and models.

```python
from darkhunt_api.workflow_manager import ApiClient, Configuration, WorkspacesApi

config = Configuration(
    host="https://api.darkhunt.ai/workflow-manager",
    access_token="dh-...",           # API key, or an OAuth access token
)

with ApiClient(config) as client:
    workspaces = WorkspacesApi(client).list_workspaces(tenant_id="...")
```

```python
from darkhunt_api.guardrail_manager import ApiClient, Configuration, GuardrailRulesApi

config = Configuration(
    host="https://api.darkhunt.ai/guardrail-manager",
    access_token="dh-...",
)

with ApiClient(config) as client:
    rules = GuardrailRulesApi(client).list_guardrail_rules(tenant_id="...")
```

Create and revoke API keys under **Settings → Security → API Keys**. A key
carries the same privileges as the account that created it — treat it like a
password.

## Versioning

This package has its own version, independent of the API contracts it wraps —
it ships several services, and they version separately. The contract revision
each module was generated from is recorded in the package:

```python
import darkhunt_api
darkhunt_api.CONTRACT_VERSIONS
# {'guardrail_manager': '0.5.0', 'workflow_manager': '0.29.0'}

from darkhunt_api import workflow_manager
workflow_manager.__version__      # the workflow-manager contract version
```

<!-- contract-versions:start -->
| Module | Contract | Version |
| --- | --- | --- |
| `darkhunt_api.guardrail_manager` | `guardrail-manager` | 0.5.0 |
| `darkhunt_api.workflow_manager` | `workflow-manager` | 0.30.2 |
<!-- contract-versions:end -->

## License

Apache-2.0
