Asiri API Python SDK
Project description
asiri-sdk
Official Python SDK for the Asiri API.
Install
pip install asiri-sdk
Quickstart
from asiri import AsiriClient, AsiriError
asiri = AsiriClient(
api_key="sk_live_...",
)
try:
overview = asiri.get("/v1/reports/overview")
except AsiriError as exc:
print(exc.code, exc.status, exc.request_id)
else:
print(overview)
Mutating requests
Pass an idempotency key on POST, PUT, PATCH, and DELETE requests so retries are safe:
asiri.post(
"/v1/reports/build",
json_body={"type": "audit_summary", "format": "json"},
idempotency_key="retry-safe-key",
)
AsiriClient defaults to https://api.asiri.ng, sends Accept: application/json, and
adds User-Agent: asiri-sdk/<version> unless you override those headers.
Development
PYTHONPATH=packages/sdk-python/src python3 -m unittest discover packages/sdk-python/tests
python3 -m pip wheel packages/sdk-python --no-deps --wheel-dir /tmp/asiri-sdk-wheel
Project details
Release history Release notifications | RSS feed
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 asiri_sdk-0.1.0.tar.gz.
File metadata
- Download URL: asiri_sdk-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
092ba10f33f8d2aa73736d1a9047bd2ff4293512391cddcb68bc824fc6cb833b
|
|
| MD5 |
3382167127fbe490064a708f670f2efa
|
|
| BLAKE2b-256 |
a609fdcbbe31ba01e30ef475b30d76d8fa0297931ba4747ed6b04c4ce448cc71
|
Provenance
The following attestation bundles were made for asiri_sdk-0.1.0.tar.gz:
Publisher:
release-sdk-py.yml on asiri-ng/asiri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asiri_sdk-0.1.0.tar.gz -
Subject digest:
092ba10f33f8d2aa73736d1a9047bd2ff4293512391cddcb68bc824fc6cb833b - Sigstore transparency entry: 1549794899
- Sigstore integration time:
-
Permalink:
asiri-ng/asiri@982d64008ea7982bc724b6b5b5d57c08eb036c0a -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/asiri-ng
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk-py.yml@982d64008ea7982bc724b6b5b5d57c08eb036c0a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file asiri_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: asiri_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418501dedf5e3f3c58c4908bdaed895f5016d4b9b8b1b78a269bd52a6ed56a52
|
|
| MD5 |
a19aa3a2b29b13b8396e14b2435ab78b
|
|
| BLAKE2b-256 |
c97ab02072213ca972b9e347cc13600085e333c00bf2e0f888460fc228b16efa
|
Provenance
The following attestation bundles were made for asiri_sdk-0.1.0-py3-none-any.whl:
Publisher:
release-sdk-py.yml on asiri-ng/asiri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asiri_sdk-0.1.0-py3-none-any.whl -
Subject digest:
418501dedf5e3f3c58c4908bdaed895f5016d4b9b8b1b78a269bd52a6ed56a52 - Sigstore transparency entry: 1549794931
- Sigstore integration time:
-
Permalink:
asiri-ng/asiri@982d64008ea7982bc724b6b5b5d57c08eb036c0a -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/asiri-ng
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk-py.yml@982d64008ea7982bc724b6b5b5d57c08eb036c0a -
Trigger Event:
workflow_dispatch
-
Statement type: