--- id: httsleep version: "0.3.1" license: Apache license_treatment: permissive maintenance: abandoned --- # httsleep — A python library for polling HTTP endpoints - batteries included! License: permissive · Maintenance: abandoned · Downloads: 176.9K/mo ## What it is and what it does httsleep is a polling library that repeatedly calls an HTTP endpoint until your success conditions are satisfied or an alarm condition fires. You define what success looks like (e.g., status code 200 and a specific JSON field value), set optional alarm conditions that should halt polling early (e.g., a 404 or an error flag in the response), and call the library with a URL and retry limit. It uses jsonpath-rw to match nested JSON fields and requests to make the actual HTTP calls. The library is designed for scenarios where you need to wait for an asynchronous operation—like a background job or a provisioning task—to complete. You can attach callbacks to alarm conditions to add custom logic. If a success condition is met, you get the response; if an alarm fires, you get an exception with the response and the alarm that triggered it. Use it for: - Poll a job-status endpoint until a background task completes or fails, with early exit on error codes - Wait for a service to become healthy after deployment, checking both HTTP status and response body fields - Monitor an async operation with custom callbacks that decide whether to treat a response as a real failure - Test HTTP endpoints in integration tests by polling until expected state is reached or timeout occurs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. httsleep polls HTTP endpoints repeatedly until a success condition is met or an alarm condition triggers, supporting status code checks, JSON response matching via JSONPath, and custom callbacks. No. The package is abandoned (last commit 2018-11-04, no activity since). Its classifiers list Python 2.7 through 3.7 support, and compatibility with current Python versions is untested. For new projects, consider a maintained alternative. If you have legacy code already using httsleep, it may still work, but do not adopt it for new work. ## Install pip install httsleep uv add httsleep poetry add httsleep ## Installing httsleep Before you install: Installation is straightforward with low friction—pure Python wheel with only two runtime dependencies. However, the package is abandoned; the last commit was 2018-11-04 and no maintenance has occurred since. License in practice: Licensed under Apache (permissive), so you can use it freely in commercial and private projects without viral obligations, though you must include a copy of the license. Quickstart: pip install httsleep from httsleep import httsleep, Alarm until = {'status_code': 200, 'jsonpath': [{'expression': 'status', 'value': 'OK'}]} alarms = [{'status_code': 404}] try: response = httsleep('http://myendpoint/jobs/1', until, alarms=alarms, max_retries=20) except Alarm as e: print("Alarm matched:", e.alarm) Verify before relying: - Whether httsleep works reliably on Python versions after 3.7, given the last release predates those versions - Whether jsonpath-rw and requests dependencies have known security issues or breaking changes since 2018-11-04 ## Package facts - License: Apache (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 176.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags http polling library, retry with conditions, jsonpath response matching, polling with alarms, http endpoint polling, wait for http response, conditional http retry, polling, abandoned [View on SkillFed](https://skillfed.io/packages/httsleep) · [View on PyPI](https://pypi.org/project/httsleep/)