Official Python SDK and command line interface for the Hive Minded AI beekeeping management API.
Project description
Hive Minded AI Python SDK
A small, typed Python client and command line interface for the Hive Minded AI beekeeping management API.
Install
Once published to PyPI:
pip install hiveminded-ai
For local development from this repository:
pip install -e sdk/python
Authentication
The client and CLI read credentials from the environment:
| Variable | Required | Default | Purpose |
|---|---|---|---|
HIVEMINDED_API_KEY |
yes | none | Bearer token sent as Authorization: Bearer <key> |
HIVEMINDED_BASE_URL |
no | https://api.hiveminded.ai |
API origin |
The key is never written to disk, logged, or exposed via repr.
Quickstart (Python)
from hiveminded import HiveMindedClient
# Reads HIVEMINDED_API_KEY from the environment, or pass api_key=...
with HiveMindedClient() as client:
hives = client.hives.list(limit=10)
for hive in hives["data"]:
print(hive["id"])
one = client.hives.get("hive_123")
print(one["data"])
inspection = client.inspections.create(
hive_id="hive_123",
notes="Strong laying pattern, no queen cells.",
)
result = client.agents.run("health_monitor", input={"hive_id": "hive_123"})
Responses are returned as the parsed JSON body. List endpoints use the
standard envelope {"data": [...], "meta": {"total", "limit", "offset", "has_more", "cursor"}}; read response["data"] for the items.
Error handling
from hiveminded import (
HiveMindedAuthError,
HiveMindedNotFoundError,
HiveMindedAPIError,
)
try:
client.hives.get("does-not-exist")
except HiveMindedNotFoundError:
... # HTTP 404
except HiveMindedAuthError:
... # HTTP 401 / 403
except HiveMindedAPIError as err:
print(err.status_code, err.code, err.request_id)
Errors never carry request payloads, headers, or credentials, so they are safe to log.
Quickstart (CLI)
export HIVEMINDED_API_KEY=sk_live_...
hiveminded hives list --limit 10
hiveminded hives get hive_123
hiveminded inspections create --hive hive_123 --notes "Looks healthy"
hiveminded tasks list --status open
hiveminded tasks create --title "Add second brood box"
hiveminded agents run health_monitor --input '{"hive_id": "hive_123"}'
hiveminded mcp config
Every command prints the API response as pretty-printed JSON. You can also pass the key inline for a single invocation (it is set for that process only and never persisted):
hiveminded --api-key sk_live_... hives list
Development
cd sdk/python
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/python -m pytest -q
.venv/bin/ruff check src tests
Tests use httpx.MockTransport and a fake client, so no network access is
required.
Publishing
Publishing to PyPI is a maintainer step and is intentionally not automated here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hiveminded_ai-0.1.0.tar.gz.
File metadata
- Download URL: hiveminded_ai-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44a397c7ead5e3b55c7bdc8200438f4d5d1934e795f2cb133fd58b565278ab5
|
|
| MD5 |
8cd3dd118296fce9b9aea6b97c896638
|
|
| BLAKE2b-256 |
a40187969995a408ab7817e910e32a45ca2981c7c93d07b64b3742bf6ac6d4d3
|
Provenance
The following attestation bundles were made for hiveminded_ai-0.1.0.tar.gz:
Publisher:
publish-python-sdk.yml on SaaSy-Solutions/apiary-pro-saas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hiveminded_ai-0.1.0.tar.gz -
Subject digest:
e44a397c7ead5e3b55c7bdc8200438f4d5d1934e795f2cb133fd58b565278ab5 - Sigstore transparency entry: 2086580983
- Sigstore integration time:
-
Permalink:
SaaSy-Solutions/apiary-pro-saas@bef3a0b1f24e72d4cf832a7d76c0440ee301e3de -
Branch / Tag:
refs/tags/python-sdk-v0.1.0 - Owner: https://github.com/SaaSy-Solutions
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@bef3a0b1f24e72d4cf832a7d76c0440ee301e3de -
Trigger Event:
push
-
Statement type:
File details
Details for the file hiveminded_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hiveminded_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5189d1d219b41ac5f31ce59a28510c3a8cade390e0adc419294cf5c274060851
|
|
| MD5 |
fe7d8ff69e8515115698ac05adc6e22c
|
|
| BLAKE2b-256 |
1b91527da893315e8492209994a4f2c1639a9ea04696ce990c4b8e94ed81120f
|
Provenance
The following attestation bundles were made for hiveminded_ai-0.1.0-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on SaaSy-Solutions/apiary-pro-saas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hiveminded_ai-0.1.0-py3-none-any.whl -
Subject digest:
5189d1d219b41ac5f31ce59a28510c3a8cade390e0adc419294cf5c274060851 - Sigstore transparency entry: 2086581122
- Sigstore integration time:
-
Permalink:
SaaSy-Solutions/apiary-pro-saas@bef3a0b1f24e72d4cf832a7d76c0440ee301e3de -
Branch / Tag:
refs/tags/python-sdk-v0.1.0 - Owner: https://github.com/SaaSy-Solutions
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@bef3a0b1f24e72d4cf832a7d76c0440ee301e3de -
Trigger Event:
push
-
Statement type: