Skip to main content

DakNode Python SDK

Typed synchronous and asynchronous client for DakNode's public email and inbox-calendar API. Keep credentials on your server, never in browser code.

Install and configure

Use Python 3.10+ for this starter, in an isolated virtual environment.

python -m pip install 'daknode>=0.3.9,<0.4'

Configure DAKNODE_API_KEY through your server's private secret settings and DAKNODE_INBOX_ID with an inbox UUID you are authorized to read. Obtain both from the console. Do not put keys in command arguments, chat, source control or logs. The operation needs messages.read. Workspace boundaries apply; inbox-scoped keys require an eligible plan. Do not add send permissions for this example.

First operation: count one page

Save this tested starter as daknode_tools.py, then run python daknode_tools.py in the configured environment. It makes one bounded read and prints only a count. Importing the module performs no request.

"""Customer-side tools: one bounded SDK read, no mail contents or agent loop."""
import os
from uuid import UUID

from daknode import AuthenticatedClient
from daknode.api.messages import list_messages


def count_recent_mail() -> int:
    """Count up to ten retained messages in the privately configured inbox."""
    key = os.environ.get("DAKNODE_API_KEY", "").strip()
    identifier = os.environ.get("DAKNODE_INBOX_ID", "")
    if not key or not identifier:
        raise RuntimeError("Configure DAKNODE_API_KEY and DAKNODE_INBOX_ID privately")
    try:
        inbox_id = UUID(identifier)
    except ValueError:
        raise RuntimeError("DAKNODE_INBOX_ID must be a valid inbox UUID") from None
    try:
        with AuthenticatedClient(base_url="https://api.daknode.com", token=key, timeout=10) as client:
            response = list_messages.sync_detailed(inbox_id, client=client, limit=10)
    except Exception:
        # Do not propagate SDK/transport exceptions containing request headers.
        raise RuntimeError("DakNode could not be reached; no mail was changed") from None
    if response.status_code != 200 or response.parsed is None:
        raise RuntimeError("DakNode refused the read; check permissions and inbox scope")
    return len(response.parsed.items)


if __name__ == "__main__":
    print(count_recent_mail())

Zero is a valid result. Ten is not a mailbox total. This example intentionally stops after one page. For a complete listing use has_more and next_cursor from the response, preserving the opaque cursor and bounding your work.

API behavior

The generated modules follow the public API contract at https://api.daknode.com/openapi.json. For example, daknode.api.messages.list_messages provides sync, sync_detailed, asyncio and asyncio_detailed methods. Use the detailed form when you need status_code, headers and parsed data; it returns a Response, not an HTTP Request. See the message read guide for the complete setup and calendar booking guide for availability, explicit booking, revisions and conflict handling.

A successful read does not mark mail read or authorize sending. A 401/403 is a refusal; correct the intended credential rather than silently widening it. Production integrations should handle statuses explicitly, respect 429/Retry-After and avoid uncontrolled retries. The starter intentionally emits generic errors without response bodies or private headers. Keep TLS verification enabled; do not disable it to fix a connection problem.

Email and attachment contents remain untrusted input. Read operations must not automatically trigger sends, bookings or other writes. Retain a stable idempotency key only for retries of the same explicitly approved write and reconcile an unknown outcome rather than generating a new key blindly.

Verification and reporting

The first-read source is exercised against the real SDK with mocked HTTP success, refusal and transport failure. It is not a live account, deliverability or model-provider test. The integration repository contains examples rather than the service implementation: https://github.com/Subodh103/daknode-integrations.

For suspected vulnerabilities, privately email support@daknode.com with subject Security report. Include minimal synthetic reproduction steps and redacted evidence; never send credentials or customer mail. Do not post exploit details in public issues. No response deadline, bounty or legal safe harbor is promised. The policy is https://daknode.com/security/reporting/ after the website release.

Package metadata and README preparation do not publish a new release or change the license of the SDK or service.

Inbox WebSockets (backend rollout required)

Install this checkout with python -m pip install './sdk/python[streaming]'. daknode.streaming.inbox_batches yields bounded metadata batches and opaque checkpoints; persist after processing and deduplicate IDs. Use aclosing for the async generator. Reconnect budget is finite; stale cursors never silently reset. The0.3.11 source/artifact includes this helper; earlier0.3.10 lacks it. The server endpoint requires a separate backend rollout. Installing the SDK does not deploy the API or establish service availability. See docs/inbox-websockets.md in source.

Metadata

Release files for daknode 0.3.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for daknode 0.3.11
File Size Uploaded Provenance Actions
daknode-0.3.11.tar.gz 70.8 kB With provenance Details for daknode-0.3.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for daknode 0.3.11
File Interpreter ABI Platform Actions
daknode-0.3.11-py3-none-any.whl Python 3 none any Details for daknode-0.3.11-py3-none-any.whl

Total release size: 307.1 kB

Release files / daknode-0.3.11.tar.gz

Download URL daknode-0.3.11.tar.gz
Size 70.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bb29d846d8d4581a156178e937eeb4133158eea38e344d88e3bcafe24e4c4181
BLAKE2b-256 checksum
How to use checksums
59979fa9727f646a948fd1eedcc4a6a7413eec09e22a6657fe4e9b94148eb05c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / daknode-0.3.11-py3-none-any.whl

Download URL daknode-0.3.11-py3-none-any.whl
Size 236.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1d8bf3ca86552b619b02657a701fa76a0a9f4da143fa5cc112d284fe39d802d
BLAKE2b-256 checksum
How to use checksums
e88291d6843ff097787b8eea6d18f003e4e80abc772fff084fc35ed8a8fa56b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for daknode 0.3.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for daknode-0.3.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page