badgecollector
Python client for badgecollector.org — apify badge assignment via GitHub repository_dispatch or the relay Cloudflare Worker.
Stdlib only. No requests, no httpx. Python 3.8+.
Install
pip install badgecollector
Use
Two auth modes — pick one per call.
Worker path (recommended)
A bk_* key from the register-client workflow plus the Worker URL.
import os
from badgecollector import award_badge
result = award_badge(
api_key=os.environ["BC_API_KEY"],
worker_url="https://badgecollector-worker.sirmmo.workers.dev",
badge_id="early-adopter",
email="user@example.com", # hashed locally; never sent
expires_at="2027-06-09T00:00:00Z",
evidence="https://example.com/transcript",
)
print(result["recipient_page"])
Direct dispatch
A GitHub PAT with Actions: write + Contents: read on the repo.
result = award_badge(
token=os.environ["GH_TOKEN"],
badge_id="early-adopter",
email="user@example.com",
client_id="acme-corp",
)
API
hash_email(email: str) -> str
# SHA-256 hex of nfc(lowercase(trim(email))).
award_badge(*, badge_id, email=None, email_hash=None,
api_key=None, worker_url=None, token=None,
expires_at=None, evidence=None, client_id=None,
owner="sirmmo", repo="badgecollector") -> dict
await_award_completion(*, token, triggered_at,
owner="sirmmo", repo="badgecollector",
timeout_s=120.0, interval_s=4.0) -> dict
# Raises AwardError on upstream rejection, ValueError on invalid input.
See CLAUDE.md for the full system specification.
License
MIT
Metadata
Release files for badgecollector 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| badgecollector-0.1.0.tar.gz | 4.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| badgecollector-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / badgecollector-0.1.0.tar.gz
| Download URL | badgecollector-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f562bbeff8f54f270fb42a41de96c709465d9fd67e3ead6174dabf471c28b35
|
|
BLAKE2b-256 checksum How to use checksums |
e12897d6fe03084a8ccb4444480e0a1c4a561359c62bd95bb61c31fb540235a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logRelease files / badgecollector-0.1.0-py3-none-any.whl
| Download URL | badgecollector-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
315d7f4c1d4bfebd00a3021c1f3704ca301b3869fcab4c26ce1e0b2f78a3c823
|
|
BLAKE2b-256 checksum How to use checksums |
f403b63c93225ea66a0dbae9c7674462e81b6a3140bd1ff31034bb0ef0ea324a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logSecurity for badgecollector 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for badgecollector-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.