Getting Started
Installation
pip install capo-inspector-scan
Usage
from capo_inspector_scan import AsyncInspectorScanClient
async def main():
async with AsyncInspectorScanClient() as inspector_scan:
# Example: call the scan_sbom operation
response = await inspector_scan.scan_sbom()
print(response["sbom"])
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_inspector_scan import AsyncInspectorScanClient
from capo_inspector_scan.error import AccessDeniedException
async def main():
async with AsyncInspectorScanClient() as inspector_scan:
try:
await inspector_scan.scan_sbom()
except AccessDeniedException as e:
print(f"Error: {e}")
print(e.data) # additional error data
Retrying
The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their is_retryable and is_throttling_error attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the @retryable trait, are raised immediately without further attempts.
The number of attempts defaults to 3 and can be changed at the client level via retry_max_attempts, or per call via config_overrides.
from capo_inspector_scan import AsyncInspectorScanClient
async def main():
async with AsyncInspectorScanClient() as inspector_scan:
# Default: 3 attempts for every operation
response = await inspector_scan.scan_sbom()
# Override per operation
response = await inspector_scan.scan_sbom(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await inspector_scan.scan_sbom(config_overrides={"retry_max_attempts": 1})
Release files for capo-inspector-scan 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| capo_inspector_scan-0.1.0.tar.gz | 45.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_inspector_scan-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.5 kB
Release files / capo_inspector_scan-0.1.0.tar.gz
| Download URL | capo_inspector_scan-0.1.0.tar.gz |
|---|---|
| Size | 45.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee986492b23bdb2ebb8a8d6081ecf71b3387039f0bc1b4ba92532e3ac4bb4558
|
|
BLAKE2b-256 checksum How to use checksums |
8249f98d6fbe4394de17c93cde8397b0e2f361e459a970cf836fa72472b2f00b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / capo_inspector_scan-0.1.0-py3-none-any.whl
| Download URL | capo_inspector_scan-0.1.0-py3-none-any.whl |
|---|---|
| Size | 55.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e6aa085b9444e781ae038c0ec3a811c2219e2610bf3467f0061386b69fa4d14
|
|
BLAKE2b-256 checksum How to use checksums |
6672a6521a6a1444db605f6861d5144129fa91734fadc9e864319fb38d088b60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|