{"id":51891429,"url":"https://github.com/coldbricks/hearback","last_synced_at":"2026-07-26T04:30:24.320Z","repository":{"id":372901941,"uuid":"1309176422","full_name":"coldbricks/hearback","owner":"coldbricks","description":"Listener-side output re-validation decorator against schema/predicate.","archived":false,"fork":false,"pushed_at":"2026-07-22T19:20:38.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-24T05:05:19.198Z","etag":null,"topics":["coldbricks","decorator","output-validation","pypi","python","typed","validation","zero-dependency"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/hearback/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldbricks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-22T19:20:33.000Z","updated_at":"2026-07-22T19:21:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/coldbricks/hearback","commit_stats":null,"previous_names":["coldbricks/hearback"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/coldbricks/hearback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbricks%2Fhearback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbricks%2Fhearback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbricks%2Fhearback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbricks%2Fhearback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldbricks","download_url":"https://codeload.github.com/coldbricks/hearback/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbricks%2Fhearback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35901460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-26T02:00:06.503Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coldbricks","decorator","output-validation","pypi","python","typed","validation","zero-dependency"],"created_at":"2026-07-26T04:30:23.453Z","updated_at":"2026-07-26T04:30:24.307Z","avatar_url":"https://github.com/coldbricks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hearback\n\n[![PyPI](https://img.shields.io/pypi/v/hearback.svg)](https://pypi.org/project/hearback/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/hearback.svg)](https://pypi.org/project/hearback/)\n[![CI](https://github.com/coldbricks/hearback/actions/workflows/ci.yml/badge.svg)](https://github.com/coldbricks/hearback/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nListener-side counterpart to echo-confirmation: a decorator that re-validates function outputs against a schema or predicate before they leave the call boundary.\n\n## Install\n\n```bash\npip install hearback\n```\n\n## Quickstart\n\n```python\nfrom hearback import hearback, HearbackError\n\n@hearback(lambda n: isinstance(n, int) and n \u003e= 0)\ndef absolute_delta(a, b):\n    return abs(a - b)\n\nassert absolute_delta(3, 10) == 7\n\n@hearback(str)\ndef label(x):\n    return x\n\nassert label(\"ok\") == \"ok\"\ntry:\n    label(123)\nexcept HearbackError:\n    pass\n```\n\n## Why this exists\n\n- Enforce output contracts at the function boundary\n- Accept a callable predicate or a type / tuple of types\n- Surface failures as `HearbackError` with the bad value\n\n## API\n\n| Symbol | Description |\n|--------|-------------|\n| `hearback(predicate)` | Decorator; predicate is callable or type |\n| `HearbackError` | Raised when output fails re-validation |\n\n## Related packages\n\nPart of the coldbricks micro-library suite (small, typed, zero-dependency helpers):\n\n| Package | Role |\n|---------|------|\n| [`buzzkill`](https://github.com/coldbricks/buzzkill) | Guaranteed shutdown callbacks |\n| [`aftercare`](https://github.com/coldbricks/aftercare) | Reverse-order teardown |\n| [`fluffer`](https://github.com/coldbricks/fluffer) | Startup pre-warm |\n| [`edging`](https://github.com/coldbricks/edging) | Token-bucket rate limit |\n| [`readback`](https://github.com/coldbricks/readback) | Echo-confirmation validation |\n| **hearback** | Output re-validation decorator |\n| [`agecheck`](https://github.com/coldbricks/agecheck) | Timezone-correct age thresholds |\n| [`transponder`](https://github.com/coldbricks/transponder) | State broadcast on change |\n\n## Development\n\n```bash\npip install -e \".[dev]\"\npytest -q\nruff check .\nmypy src\n```\n\n## Roadmap\n\nThis is an early **0.1.0** release (Alpha) with active development planned:\n\n- JSON Schema / pydantic integration\n- Async function support\n- Structured advisory payloads on failure\n\n## License\n\nMIT © Coldbricks — coldbricks@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldbricks%2Fhearback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldbricks%2Fhearback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldbricks%2Fhearback/lists"}