hcb
hcb is a Python 3.10+ wrapper library for the Hack Club Bank v3 API. It provides typed access to organizations, transactions, cards, donations, and other financial data with both synchronous and asynchronous support.
Installation
hcb is available on PyPI and can be installed with any package manager:
pip install hcb
# or
poetry add hcb
# or
uv add hcb
You can also install it from source:
pip install git+https://github.com/trag1c/hcb.git
Usage
Basic example
import hcb
for txn in hcb.get_organization_transactions("hq"): # Hack Club HQ
print(txn.memo, txn.amount_cents)
# or
hq = hcb.get_organization("hq")
for txn in hq.get_transactions():
print(txn.memo, txn.amount_cents)
Expanding nested objects
By default, related objects like donations, cards, and users are returned as
None. Use the expand parameter to fetch them:
# Without expand, nested objects have very little data:
txn = hq.get_transactions()[0]
print(txn.card_charge.date) # None
# With expand, a lot more donation data is included:
txn = hq.get_transactions(expand="card_charge")[0]
print(txn.card_charge.date) # 2026-03-22 00:00:00
# Multiple objects can be expanded by separating them with commas:
txn = hq.get_transactions(expand="donation,user,organization")[0]
Asynchronous usage
All functions have async equivalents prefixed with async_:
import asyncio
import hcb
async def main() -> None:
ghostty = await hcb.async_get_organization("ghostty")
transactions = await ghostty.async_get_transactions(expand="donation")
for txn in transactions:
if donation := txn.donation:
print(f"Donation: ${donation.amount_cents / 100:.2f}")
asyncio.run(main())
API reference
See core.py.
License
hcb is licensed under the MIT License. © trag1c, 2026
Metadata
Release files for hcb 1.0.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 | Actions |
|---|---|---|---|---|
| hcb-1.0.0.tar.gz | 7.4 kB | Without provenance | Details for hcb-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hcb-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for hcb-1.0.0-py3-none-any.whl |
Total release size: 15.6 kB
Release files / hcb-1.0.0.tar.gz
| Download URL | hcb-1.0.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5af024f558a7ec2ad67fb8213b1a197a23a603fbd544fa01285e69ab8923f637
|
|
BLAKE2b-256 checksum How to use checksums |
d9af1b169c772a0da9bc2c3e8e6fc9955cf2d0127ddc4a83f04cd184770c6881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / hcb-1.0.0-py3-none-any.whl
| Download URL | hcb-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22917f98ceb0663a933a0948e9dc22d0bd66c8979d7073dd4d924d9e2c134039
|
|
BLAKE2b-256 checksum How to use checksums |
6ad0dbf2af58e10160e730b1229225bac1898a8578ffc07eed0547051ebb65b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for hcb 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.