Skip to main content

pythonik

A complete, generated Python SDK for the iconik media management API.

  • 15 services, one subpackage each: pythonik.acls, pythonik.assets, pythonik.auth, pythonik.automations, pythonik.files, pythonik.jobs, pythonik.metadata, pythonik.ml, pythonik.notifications, pythonik.search, pythonik.settings, pythonik.stats, pythonik.transcode, pythonik.users, pythonik.usersnotifications
  • Every operation in every service — generated from iconik's published OpenAPI specs with openapi-python-client. Fully typed (attrs models, py.typed), sync and async for every endpoint (httpx).
  • 2.0 is a rewrite with a 1.x compatibility layer: 1.x was hand-written and covered a subset of the API; 2.0 is generated and covers the complete API surface (953 endpoints). The full 1.x interface (pythonik.client.PythonikClient, pythonik.specs.*, pythonik.models.*) still ships and works unchanged — see COMPAT.md for the short list of deviations.

Install

pip install pythonik

Requires Python >= 3.10.

Usage

Set your App-ID / Auth-Token credentials once, on the client; every call through that client is authenticated. Each service has its own base URL, https://app.iconik.io/API/<service>:

import os

from pythonik.assets import Client
from pythonik.assets.api.assets import get_assets_by_asset_id

client = Client(
    base_url="https://app.iconik.io/API/assets",
    headers={
        "App-ID": os.environ["ICONIK_APP_ID"],
        "Auth-Token": os.environ["ICONIK_AUTH_TOKEN"],
    },
)

asset = get_assets_by_asset_id.sync(asset_id="some-asset-uuid", client=client)
print(asset)

Every endpoint module offers sync, sync_detailed, asyncio, and asyncio_detailed. The *_detailed variants return a Response with status code, headers, and the parsed body.

API function paths mirror the REST API: GET /v1/assets/{asset_id}/versions/ on the assets service is pythonik.assets.api.assets.get_assets_by_asset_id_versions. If you know the endpoint, you know the function.

All subpackages share one client implementation (pythonik._base) — a Client built for one service works for another by swapping base_url, and cross-service isinstance checks on errors/types behave as expected.

Friendly client

pythonik.friendly.Iconik gives every operation a human name — the same 962 names the iconik CLI uses — with one client for all 15 services:

from pythonik.friendly import Iconik

ik = Iconik(app_id, auth_token)
ik.put_asset_metadata(asset_id, view_id, body=values)   # PUT /v1/assets/{id}/views/{view_id}/
files = ik.get_asset_files(asset_id).parsed

Path parameters are positional, body and any query/header parameters are keyword-only, and every method returns the generated Response (.status_code, .parsed). Endpoint modules are imported on first call, so importing Iconik stays fast.

Requests time out after 60s by default; override with Iconik(app_id, auth_token, timeout=httpx.Timeout(300.0)) (or timeout=None to wait forever). Self-hosted iconik? Pass base_url:

ik = Iconik(app_id, auth_token, base_url="https://iconik.example.com/API")

The 33 operations iconik's specs mark unauthenticated — the login and SAML flows — send no auth headers, matching the spec; the one operation that declares only App-ID sends only that. close() (or using Iconik as a context manager) closes every client it built; calling a method afterwards raises RuntimeError.

One known gap: post_auth_saml_idp is unusable. Its spec declares two request content types (JSON and XML) and the generator collapses them into a union that can't be satisfied — it needs a spec fix, not an SDK workaround.

Upgrading from 1.x

Nothing to change: 2.0 vendors the 1.x implementation, so existing code keeps working —

from pythonik.client import PythonikClient

client = PythonikClient(app_id=app_id, auth_token=auth_token, timeout=10)
asset = client.assets().get(asset_id)   # pythonik.models.base.Response(.response, .data)

The 1.x test suite runs against this package on every regeneration. The compat layer is frozen at the 1.x surface (~100 methods across 6 spec classes); use the generated subpackages for everything 1.x didn't cover. Deviations from 1.x (debug prints removed, loguru dropped): COMPAT.md.

How it's built

This package is generated — don't edit it by hand. It is emitted by NorthShoreAutomation/iconik-sdk-generator, which fetches iconik's live OpenAPI specs, applies lossless overlay fixes (deterministic operationIds, client-level auth via injected security schemes, enum/oneOf/content-type repairs — all bigint-safe), runs openapi-python-client per service, and merges the 15 clients into this one package. The full pipeline and the iconik spec quirks knowledge base live in that repo.

Release files for nsa-pythonik 2.2.0

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

Source distribution (sdist)

Source distribution for nsa-pythonik 2.2.0
File Size Uploaded
nsa_pythonik-2.2.0.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nsa-pythonik 2.2.0
File Interpreter ABI Platform
nsa_pythonik-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 MB

Release files / nsa_pythonik-2.2.0.tar.gz

Download URL nsa_pythonik-2.2.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9a7c7478781a0180fec7b5d2b2538cbb510936e946b9c51b1d1327f8794559fe
BLAKE2b-256 checksum
How to use checksums
3dedc6c6e42373f88509fda3e28938435b99fbfdc27b03659d1c0f032b0a6a88
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 Aug 10, 2026.

Transparency log

Release files / nsa_pythonik-2.2.0-py3-none-any.whl

Download URL nsa_pythonik-2.2.0-py3-none-any.whl
Size 4.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
05222c14e6dfe6ab576e3422e13a57b03a9b71bdbcc1627a03884021be8265b4
BLAKE2b-256 checksum
How to use checksums
ce411113ddee41446f9a7b52f224c369c2bb49fe53df50fd00a5dde7fd9d8009
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 Aug 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.15.0

2 release files

1.13.0

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.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