⚡ docsfy

timeout-sampler

Poll any function until it succeeds or times out, with fine-grained exception handling

Get Started →

Getting Started

Explore →

User Guides

Explore →

Recipes

  • Common Polling Patterns

    Copy-paste recipes for waiting on API readiness, retrying flaky operations, polling with partial functions, and combining exception filters

Explore →

Reference

  • TimeoutSampler API

    Complete constructor parameters, iteration behavior, exception handling methods, and return semantics for TimeoutSampler

  • @retry Decorator API

    All parameters accepted by the retry decorator and how they map to TimeoutSampler options

  • TimeoutWatch API

    Constructor and remaining_time() method reference for the TimeoutWatch time-tracking class

  • TimeoutExpiredError Reference

    Attributes, string representation, and access to last_exp and elapsed_time on the TimeoutExpiredError exception

Explore →

Internals

  • How Exception Matching Works

    Understand the inheritance-aware exception matching algorithm, message filtering, and the three outcome categories when an exception is raised inside the polled function

Explore →
🤖
AI-friendly documentation

This documentation is optimized for AI consumption.