Skip to main content

ipsdk

PyPI version Python Versions License: GPL v3 Tests Coverage

Python SDK for making API calls to Itential Platform and Itential Automation Gateway 4.x.

Provides sync and async HTTP clients with automatic authentication, session management, and sensitive data filtering. Single runtime dependency: httpx.

Installation

pip install ipsdk

Or with uv:

uv add ipsdk

Requires Python 3.10+.

Python Version Support

Version Status
3.10 Supported
3.11 Supported
3.12 Supported
3.13 Supported
3.14 Supported
3.15 Beta

Usage

Platform — basic auth

import ipsdk

platform = ipsdk.platform_factory(
    host="platform.itential.dev",
    user="admin@pronghorn",
    password="your-password"
)

res = platform.get("/health/server")
print(res.json())

Platform — OAuth (client credentials)

import ipsdk

platform = ipsdk.platform_factory(
    host="platform.itential.dev",
    client_id="your-client-id",
    client_secret="your-client-secret"
)

res = platform.get("/adapters")

Gateway

import ipsdk

gateway = ipsdk.gateway_factory(
    host="gateway.itential.dev",
    user="admin@itential",
    password="your-password"
)

res = gateway.get("/devices")

Async

Pass want_async=True to get an async client:

import asyncio
import ipsdk

async def main():
    platform = ipsdk.platform_factory(
        host="platform.itential.dev",
        client_id="your-client-id",
        client_secret="your-client-secret",
        want_async=True
    )
    res = await platform.get("/adapters")
    print(res.json())

asyncio.run(main())

HTTP Methods

All clients support get, post, put, delete, and patch.

Argument get post put delete patch
path required required required required required
params optional optional optional optional optional
json optional optional optional

path is the relative URI appended to the base URL. params is a dict serialized to a query string. json accepts a list or dict; when provided, sets Content-Type: application/json automatically.

Base URLs:

  • Platform: https://host:port
  • Gateway: https://host:port/api/v2.0

Configuration

Parameter platform_factory gateway_factory Description
host "localhost" "localhost" Hostname or IP
port 0 0 Port; 0 = auto (443 for TLS, 80 for plain HTTP)
use_tls True True Use HTTPS
verify True True Verify TLS certificates
user "admin" "admin@itential" Username for basic auth
password "admin" "admin" Password for basic auth
client_id None OAuth client ID (Platform only)
client_secret None OAuth client secret (Platform only)
timeout 30 30 Request timeout in seconds
ttl 0 0 Re-authenticate after N seconds; 0 = disabled
want_async False False Return an async client

Logging

import ipsdk

ipsdk.logging.set_level(ipsdk.logging.DEBUG)
ipsdk.logging.info("Connected to platform")

Available levels: TRACE (5), DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL (90), NONE (100).

The @ipsdk.logging.trace decorator logs function entry/exit with timing. Sensitive data filtering (PII, passwords, tokens) is enabled by default and can be extended:

ipsdk.logging.add_sensitive_data_pattern("ssn", r"\d{3}-\d{2}-\d{4}")

Development

# Install dependencies and pre-commit hooks
make install

# Run checks (lint, format, security, tests, license headers)
make ci

# Individual targets
make test        # pytest
make coverage    # pytest --cov (100% required)
make lint        # ruff check
make format      # ruff format
make security    # bandit scan
make license     # check GPL headers

# Test across Python 3.10–3.15
make tox

License

GPL-3.0-or-later. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipsdk-0.9.0.tar.gz (85.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipsdk-0.9.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file ipsdk-0.9.0.tar.gz.

File metadata

  • Download URL: ipsdk-0.9.0.tar.gz
  • Upload date:
  • Size: 85.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ipsdk-0.9.0.tar.gz
Algorithm Hash digest
SHA256 3bb93e303963731fbb651085dad79df1d351c13acff40565f0081af1b71b5fc1
MD5 2ed8b65accd461dcc032d1580a21acef
BLAKE2b-256 04fb64f0218e7a3ab71c09bc40bced3e750a37b1bee65caf46b4f44dde3c870c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipsdk-0.9.0.tar.gz:

Publisher: release.yaml on itential/ipsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ipsdk-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: ipsdk-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ipsdk-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e12f76fff760032145a0772dd84154a9d1236ac6cd77b484a9cd305e613ffc7
MD5 ce4846c0ec7df36129a7d55c57e8367e
BLAKE2b-256 b36855e3b627556b2fd3f681d710f9082809b8e5aff73c5144823c583d46c6e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipsdk-0.9.0-py3-none-any.whl:

Publisher: release.yaml on itential/ipsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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