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.

Metadata

Release files for daknode 0.3.10

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.10
File Size Uploaded Provenance Actions
daknode-0.3.10.tar.gz 67.5 kB With provenance Details for daknode-0.3.10.tar.gz

Built distribution (wheel)

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

Total release size: 299.6 kB

Release files / daknode-0.3.10.tar.gz

Download URL daknode-0.3.10.tar.gz
Size 67.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1a4e3c5b37fe919de78e37bd04595ead09d48f27072aa00777ed9d7991624296
BLAKE2b-256 checksum
How to use checksums
3cd438d00566bbc295438f048aa21045f4bb7cd6b11c8fdc64f379c37fae226a
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 6, 2026.

Transparency log

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

Download URL daknode-0.3.10-py3-none-any.whl
Size 232.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d8e82a5c4ed8c95a226c7873618566761b104c9abeed76fdc1c25157e6e1ee9
BLAKE2b-256 checksum
How to use checksums
8d279532342d3f495d79cad453b6775f68d3e6d1a06a28958a9a6e63a88631e6
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 6, 2026.

Transparency log

Security for daknode 0.3.10

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.10.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 6, 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