Enigmind Agent Python SDK for secure IoT connectivity.
Project description
Enigmind Agent Python SDK
A lightweight Python SDK for secure IoT device connectivity.
Quick Start
from enigmind_agent import Agent, AgentConfig
config = AgentConfig(
broker_url="mqtts://broker.enigmind.ai:8883",
device_id="device-123",
api_key="YOUR_API_KEY",
)
agent = Agent(config)
agent.start()
agent.send_telemetry({"temp": 22.4, "vibration": 0.12})
Device Claim Flow (Zero-Touch Setup)
If the agent starts without credentials (device_id + api_key/password), it automatically enters the claim flow:
- Generates a stable hardware fingerprint and a human-readable claim token.
- Calls the claim API (
/api/claims/initiate). - Polls
/api/claims/{token}/statusuntil approved. - Stores the returned credentials locally and connects to MQTT.
The claim token is printed at startup when using the CLI, and is also stored locally for retrieval.
By default the state file is saved under your user data directory as enigmind_agent/state.json.
If you embed the SDK directly, enable Python logging at INFO level to see claim output.
CLI Example
ENIGMIND_CLAIM_BASE_URL=https://api.enigmind.ai enigmind-cli run
Check claim status and token:
enigmind-cli claim status
JSON Config Example
{
"broker_url": "mqtts://broker.enigmind.ai:8883",
"claim": {
"base_url": "https://api.enigmind.ai",
"poll_interval_s": 5,
"timeout_s": 300
}
}
Installation & Setup
py -3.12 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -U pip
pip install -e .[dev]
Optional Health plugin:
pip install -e .[health]
CLI
enigmind-cli send --data '{"temp": 22.4}' --config ./enigmind.json
Releasing
Releases are published to PyPI automatically via GitHub Actions when you create a GitHub Release.
- Bump
versioninpyproject.toml. - Commit and push to
main. - Go to GitHub → Releases → Draft a new release.
- Create a new tag (e.g.
v0.1.0), add release notes, and click Publish release. - The
release.ymlworkflow will build and publish the package to PyPI.
Plugins
- Health plugin: CPU/memory/disk metrics (requires optional dependency
psutil). - Geo plugin: local geofencing hooks (no extra dependencies).
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 enigmind_agent-0.1.0.tar.gz.
File metadata
- Download URL: enigmind_agent-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef9008729d69d7968a9020eb184313258783611fda2422b293c5f44d69c61e03
|
|
| MD5 |
22b6a04c65631e825fb76b2d31e37a0f
|
|
| BLAKE2b-256 |
9fc5959c398d7355f2ae52cf19a7146481df8202f40dbb953f7fb87bc57145ae
|
Provenance
The following attestation bundles were made for enigmind_agent-0.1.0.tar.gz:
Publisher:
release.yml on nefarian-gaming/enigmind-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enigmind_agent-0.1.0.tar.gz -
Subject digest:
ef9008729d69d7968a9020eb184313258783611fda2422b293c5f44d69c61e03 - Sigstore transparency entry: 924017418
- Sigstore integration time:
-
Permalink:
nefarian-gaming/enigmind-agent@317b18c236929fffc5ce56b743f9dc44a325e5f5 -
Branch / Tag:
refs/tags/v.0.1.0 - Owner: https://github.com/nefarian-gaming
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@317b18c236929fffc5ce56b743f9dc44a325e5f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file enigmind_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: enigmind_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4946907f2183e94cedf87d5b0e4a8ac71f15ec2354eb2feb1ec8d3af8c140c63
|
|
| MD5 |
6b658221c6b88f326913cfa7cfd6f316
|
|
| BLAKE2b-256 |
ec19c6ef731445e38eacca9e27437446e1e2c4213d92e73f67748dd2a343483c
|
Provenance
The following attestation bundles were made for enigmind_agent-0.1.0-py3-none-any.whl:
Publisher:
release.yml on nefarian-gaming/enigmind-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enigmind_agent-0.1.0-py3-none-any.whl -
Subject digest:
4946907f2183e94cedf87d5b0e4a8ac71f15ec2354eb2feb1ec8d3af8c140c63 - Sigstore transparency entry: 924017420
- Sigstore integration time:
-
Permalink:
nefarian-gaming/enigmind-agent@317b18c236929fffc5ce56b743f9dc44a325e5f5 -
Branch / Tag:
refs/tags/v.0.1.0 - Owner: https://github.com/nefarian-gaming
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@317b18c236929fffc5ce56b743f9dc44a325e5f5 -
Trigger Event:
release
-
Statement type: