Skip to content

Releases: ortex-financial/ortex-python-sdk

Add thread-safe request throttling to prevent API overload and bump version to v1.0.4

Choose a tag to compare

@davidbuck-ortex davidbuck-ortex released this 19 Dec 15:48
64b9b9a
 Add thread-safe request throttling to prevent API overload. (#2)

* Add thread-safe request throttling to prevent API overload.

  - Add RequestThrottler class with semaphore-based concurrency limiting and token bucket rate limiting algorithm
  - Integrate throttler into OrtexClient with configurable parameters:
    - max_concurrent_requests (default: 2)
    - requests_per_second (default: 3.0)
  - Add TimeoutError to retry logic for automatic retry on timeouts
  - Expose throttler.stats for monitoring request statistics
  - Bump version to 1.0.4

  This prevents issues when using the client from multiple threads simultaneously, which previously could overwhelm the API and cause all requests to timeout.

* formating correction