{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/5"}],"enrichment":{"capability":"Polls a function repeatedly within a timeout window, collecting results and handling exceptions selectively, until success or timeout.","skillfed_tags":["polling","retry-logic","timeout-handling"],"use_cases":["Wait for a service to become available before proceeding with integration tests or deployment scripts","Retry API calls with selective exception handling (e.g., retry on 5xx errors but fail immediately on 4xx)","Poll for completion of long-running background tasks with a timeout and custom logging","Decorate functions to add automatic retry logic with timeout and exception filtering","Wait for SSH or network connectivity with detailed logging of connection attempts"],"what_it_does":"TimeoutSampler is a polling utility that repeatedly calls a function at fixed intervals until it returns a truthy value or a timeout expires. It wraps the function call in a loop, sleeping between attempts, and can be configured to ignore or retry on specific exception types\u2014either all instances of an exception class or only those matching string patterns or callable filters. The package includes a decorator form (@retry) for wrapping functions directly.\n\nThe primary use case is waiting for external conditions (SSH connectivity, service availability, async task completion) with fine-grained control over which exceptions should trigger retries versus immediate failure. It logs outcomes (success, failure, timeout) with elapsed time and optional custom labels, and automatically redacts sensitive kwargs like Authorization headers from logs.","worth_installing":"Yes, if you need polling with selective exception handling and timeout-based retry logic. The active maintenance and permissive license are favorable. However, verify whether pytest is a true runtime dependency\u2014if it is, the high install friction may be a concern for lightweight deployments. The minimal community visibility (0 stars) suggests limited real-world validation, so evaluate it in a test environment first."},"id":"timeout-sampler","links":{"html":"https://skillfed.io/packages/timeout-sampler","md":"https://skillfed.io/packages/timeout-sampler.md","pypi":"https://pypi.org/project/timeout-sampler/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-21","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"timeout-sampler","python_support":"supports_current","summary":"Timeout utility class to wait for any function output and interact with it in given time"},"popularity":{"monthly_downloads":184964,"position":10022,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.2"}
