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.1.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.1.0
File Size Uploaded
nsa_pythonik-2.1.0.tar.gz 1.3 MB Details

Built distribution (wheel)

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

Total release size: 5.8 MB

Release files / nsa_pythonik-2.1.0.tar.gz

Download URL nsa_pythonik-2.1.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
040dfa5f56dfb7beeb3d7d67409aa3caa67d822531bcf37274ecac192c761387
BLAKE2b-256 checksum
How to use checksums
0a5a1f6b5b194526ada37eb489e262b137a573066512c81b8e696bede110d0ae
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 7, 2026.

Transparency log

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

Download URL nsa_pythonik-2.1.0-py3-none-any.whl
Size 4.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1e9a5de765df940768914ec781ea4c26ba4f70477ca126645d328b07c12dfb2c
BLAKE2b-256 checksum
How to use checksums
3aef15f8a0585fa1d2ac4297ed977fb6d3da2b2bda95f57098e18e316f680484
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.0

2 release files

This release

2.1.0 This release

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