Skip to main content

irusdk

A Python SDK and thin CLI for querying and acting on an Iru (formerly Kandji) fleet — devices, their state, the actions you take against them, and the blueprints, users, and tags that organise them.

Features

  • Sync and async clients — IruClient and AsyncIruClient, same surface, same models.
  • Pydantic models for API responses, so you get real attributes and IDE autocomplete.
  • Transparent pagination — list methods iterate every page for you, with concurrent prefetch where the API exposes a total.
  • Rate-limit aware — honors Iru's 50 req/sec and 10,000 req/hour tenant limits, with Retry-After backoff on 429.
  • Optional CLI for ad-hoc terminal use.

Installation

pip install irusdk          # library only
pip install irusdk[cli]     # library plus the `irusdk` command

Quickstart

from irusdk import IruClient

client = IruClient(subdomain="mycompany", token="...")

for device in client.devices.list(platform="Mac"):
    print(device.device_name, device.serial_number, device.os_version)

No with block is required — construct the client and use it, the way you would httpx.Client. Call client.close() when you are finished to release the connection pool promptly, or use the client as a context manager and let it close itself:

with IruClient(subdomain="mycompany", token="...") as client:
    device = client.devices.get("2cfeb3ac-3b5d-423e-bcff-e2676a3a32da")

The async client is the same code plus async:

import asyncio

from irusdk import AsyncIruClient


async def main():
    client = AsyncIruClient(subdomain="mycompany", token="...")
    async for device in client.devices.list(platform="Mac"):
        print(device.device_name, device.serial_number)
    await client.aclose()


asyncio.run(main())

What's covered

Attribute Endpoints
client.devices list, pages, get, update, delete, details
client.blueprints list, pages, get, create, update, delete, library items, assign and remove library items (map nodes included), templates
client.users list, get, delete
client.tags list, create, update, delete
client.custom_scripts list, get, create, update, delete
client.custom_profiles list, get, create, update, delete
client.custom_apps list, get, create, update, installer upload
client.self_service categories

Pagination

List methods paginate for you — client.devices.list() walks every page and yields Device models. When you want page boundaries, the reported total, or control over how many pages are in flight, use pages() instead:

for page in client.devices.pages(platform="Mac", prefetch=8):
    print(f"page {page.index}: {len(page)} devices of {page.total}")

CLI

export IRU_SUBDOMAIN=mycompany
export IRU_API_TOKEN=...

irusdk devices list --platform Mac
irusdk devices get <device-id>
irusdk blueprints list
irusdk users list --limit 50
irusdk tags create "lab-machines"

Every read command takes --json.

Scope

irusdk covers the Iru API: the fleet surface — devices, actions, Prism, users, tags, blueprints — and, from 0.2.0, library-content authoring.

Library item Authoring support
Custom Scripts available
Custom Profiles available
Self Service categories available (read-only; Iru exposes no write)
Custom Apps list, get, create, update, and installer upload
In-House Apps not planned

Earlier releases left authoring to iructl on the reasoning that content authoring and fleet querying are different problems. The querying half of that still holds. The authoring half rested on the assumption that the hard part of authoring is talking to the API — and it is not. The hard part is the repository side: what a component looks like on disk, which fields a human owns and which the vendor assigns, how a pull reconciles with a working tree. Those are decisions a repository has to make for itself.

So the seam moved. irusdk owns the API and has no opinion about your filesystem; your own tooling owns the repository.

The durability argument against this is real and is worth keeping visible: iructl is maintained by Iru, so when the API changes, the people who changed it ship the fix. Adopting authoring here means accepting on-call for that drift. If you do not need repository-side control, iructl is still the shorter path.

Task Tool
Upload a Custom App package irusdk
Assign a library item to a blueprint or map node irusdk
Declaratively reconcile blueprint assignments from a repository iructl, or your own tooling
Read or author Custom Scripts and Profiles irusdk
Find every Mac on an outdated OS irusdk
Report FileVault or compliance state across the fleet irusdk
Lock, erase, or restart a device irusdk
Build a dashboard, Slack bot, or scheduled report irusdk

Documentation

Full documentation lives at irusdk.readthedocs.io.

License

Apache-2.0. See LICENSE.

Metadata

Release files for irusdk 0.4.2

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

Source distribution (sdist)

Source distribution for irusdk 0.4.2
File Size Uploaded
irusdk-0.4.2.tar.gz 161.0 kB Details

Built distribution (wheel)

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

Total release size: 233.6 kB

Release files / irusdk-0.4.2.tar.gz

Download URL irusdk-0.4.2.tar.gz
Size 161.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c8d44e7a52013d5e5a2591eb91ff0a95396dd3787ef49485b1ece67fb5d90871
BLAKE2b-256 checksum
How to use checksums
4b97a5b598004ba815e8a1e270ff21596901905dcaa1ecf78c7c1c6454f54cf5
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 Oct 11, 2026.

Transparency log

Release files / irusdk-0.4.2-py3-none-any.whl

Download URL irusdk-0.4.2-py3-none-any.whl
Size 72.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc88ab40a8215c5de6873eb748c3cbc0d048227f4e2e2804ae0643b214eb9cd9
BLAKE2b-256 checksum
How to use checksums
edad8cb13370fbb9311a3c659cd9cd465986d2bcabd953cbb5a145202c22fcce
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 Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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