Skip to main content

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:

  1. Wait with exponential backoff (4s, then 8s, then 10s max)
  2. Retry the request
  3. Return the result if successful, or raise the exception after exhausting retries

Project details


Download files

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

Source Distribution

scoutsdk-0.2.1.tar.gz (404.5 kB view details)

Uploaded Source

Built Distribution

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

scoutsdk-0.2.1-py3-none-any.whl (465.4 kB view details)

Uploaded Python 3

File details

Details for the file scoutsdk-0.2.1.tar.gz.

File metadata

  • Download URL: scoutsdk-0.2.1.tar.gz
  • Upload date:
  • Size: 404.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scoutsdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c47ce07f3ee2a587bbf4c6beb99e23c713131cb1811d7337c33749effb845f2b
MD5 194f4a48583f78c0396d406e50688ddf
BLAKE2b-256 b589211c1559d99e2b4d6fa49c3fd25ab7120f9fff2ae24e2a268f9e8389896e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scoutsdk-0.2.1.tar.gz:

Publisher: publish-python-sdk.yml on mirego/mirego-scout

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

File details

Details for the file scoutsdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: scoutsdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 465.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scoutsdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73502ee062a52e9c5fb894321e42642501d9e94726b3f5c7a21ce64dab49a005
MD5 ff9b0f16885c9a445c8b8d23cd7a7f80
BLAKE2b-256 8b9fa43b8a57264f27502eac6a74391ac6dfa3ae31e7b1f4855297c945044285

See more details on using hashes here.

Provenance

The following attestation bundles were made for scoutsdk-0.2.1-py3-none-any.whl:

Publisher: publish-python-sdk.yml on mirego/mirego-scout

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page