ipsdk
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bb93e303963731fbb651085dad79df1d351c13acff40565f0081af1b71b5fc1
|
|
| MD5 |
2ed8b65accd461dcc032d1580a21acef
|
|
| BLAKE2b-256 |
04fb64f0218e7a3ab71c09bc40bced3e750a37b1bee65caf46b4f44dde3c870c
|
Provenance
The following attestation bundles were made for ipsdk-0.9.0.tar.gz:
Publisher:
release.yaml on itential/ipsdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipsdk-0.9.0.tar.gz -
Subject digest:
3bb93e303963731fbb651085dad79df1d351c13acff40565f0081af1b71b5fc1 - Sigstore transparency entry: 2550940798
- Sigstore integration time:
-
Permalink:
itential/ipsdk@16c75376365085d9a520b091c0c6296fd78d993f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/itential
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@16c75376365085d9a520b091c0c6296fd78d993f -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e12f76fff760032145a0772dd84154a9d1236ac6cd77b484a9cd305e613ffc7
|
|
| MD5 |
ce4846c0ec7df36129a7d55c57e8367e
|
|
| BLAKE2b-256 |
b36855e3b627556b2fd3f681d710f9082809b8e5aff73c5144823c583d46c6e2
|
Provenance
The following attestation bundles were made for ipsdk-0.9.0-py3-none-any.whl:
Publisher:
release.yaml on itential/ipsdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipsdk-0.9.0-py3-none-any.whl -
Subject digest:
1e12f76fff760032145a0772dd84154a9d1236ac6cd77b484a9cd305e613ffc7 - Sigstore transparency entry: 2550940855
- Sigstore integration time:
-
Permalink:
itential/ipsdk@16c75376365085d9a520b091c0c6296fd78d993f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/itential
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@16c75376365085d9a520b091c0c6296fd78d993f -
Trigger Event:
push
-
Statement type: