Python package for scoutsdk
Project description
Scout SDK Package
Helper python package to interact with the Scout platform.
Installation
pip install scoutsdk
Usage
from scoutsdk import ScoutAPI
scout = ScoutAPI(base_url="your_scout_base_url", api_access_token="you_api_access_token")
Retry Logic
The SDK automatically retries failed API requests with exponential backoff to handle transient failures. This improves reliability when dealing with network issues or temporary server problems.
Default Behavior
- Max attempts: 3 (initial request + 2 retries)
- Wait time: Exponential backoff with multiplier=1, min=4s, max=10s
- Retry on:
- Rate limiting (429)
- Server errors (500, 502, 503, 504)
- Network errors (ConnectionError, Timeout)
- Does NOT retry on:
- Client errors (400, 401, 403, 404, etc.)
- Successful responses
How It Works
All HTTP methods (GET, POST, PUT, DELETE, PATCH) in the SDK automatically retry on transient failures:
from scoutsdk import ScoutAPI
scout = ScoutAPI(base_url="your_url", api_access_token="your_token")
# This request will automatically retry up to 3 times on 5xx errors
response = scout.chat.completion(messages="Hello!")
The retry logic is transparent - you don't need to change your code. If a request fails with a retryable error, the SDK will:
- Wait with exponential backoff (4s, then 8s, then 10s max)
- Retry the request
- Return the result if successful, or raise the exception after exhausting retries
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 scoutsdk-0.2.7.tar.gz.
File metadata
- Download URL: scoutsdk-0.2.7.tar.gz
- Upload date:
- Size: 411.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38e6d0cd8a235991d4994048f933156def2542da0e6d868273f232b2b9e23d1c
|
|
| MD5 |
7472f2e68c05c7c63939d3189cf262bb
|
|
| BLAKE2b-256 |
2211c08439da2d965da0d42d9fdc450894f9ea720e086a4e34d95abd1cc6493d
|
Provenance
The following attestation bundles were made for scoutsdk-0.2.7.tar.gz:
Publisher:
publish-python-sdk.yml on mirego/mirego-scout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scoutsdk-0.2.7.tar.gz -
Subject digest:
38e6d0cd8a235991d4994048f933156def2542da0e6d868273f232b2b9e23d1c - Sigstore transparency entry: 814737217
- Sigstore integration time:
-
Permalink:
mirego/mirego-scout@1b8bebd40b364d78df0671cb7d11c90f84596da4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mirego
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@1b8bebd40b364d78df0671cb7d11c90f84596da4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scoutsdk-0.2.7-py3-none-any.whl.
File metadata
- Download URL: scoutsdk-0.2.7-py3-none-any.whl
- Upload date:
- Size: 473.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9584d68dae8c2231c8cd99c8c8004584864d618f1f318b00372befc69b5434f8
|
|
| MD5 |
26385e26e74cfe4a163ce9fedf776b0f
|
|
| BLAKE2b-256 |
86ca7c249363510f911b091ecfd993e1ef6281f16eef4f5bfe174afdda8c993d
|
Provenance
The following attestation bundles were made for scoutsdk-0.2.7-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on mirego/mirego-scout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scoutsdk-0.2.7-py3-none-any.whl -
Subject digest:
9584d68dae8c2231c8cd99c8c8004584864d618f1f318b00372befc69b5434f8 - Sigstore transparency entry: 814737219
- Sigstore integration time:
-
Permalink:
mirego/mirego-scout@1b8bebd40b364d78df0671cb7d11c90f84596da4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mirego
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@1b8bebd40b364d78df0671cb7d11c90f84596da4 -
Trigger Event:
workflow_dispatch
-
Statement type: