Hacker News Data Fetcher
Fetches Hacker News items from the official Firebase API straight into
Hive-partitioned Parquet files (data/year=YYYY/month=M/data.parquet), and can
sync them to a Tigris/S3 bucket. No intermediate database.
pip install -e '.[fast]' # 'fast' adds uvloop
Fetch
hn-data-fetcher # update: continue after the newest stored id
hn-data-fetcher --until 2025-04-16 # ...but stop at a date (a bounded test run)
hn-data-fetcher --mode overwrite-from-date --start-date 2025-03-01
hn-data-fetcher --mode overwrite --start-id 43372773
hn-data-fetcher --mode repair # refetch ids missing between partitions
hn-data-fetcher --dry-run # show the plan only
Options: --data-dir (default ./data), --concurrency (default 2500; HN starts
resetting connections around 6000), --chunk-size (ids per commit, default 200k),
--end-id, --until.
- Resume is automatic: the highest stored id is the resume point. A chunk is committed only after every id in it was fetched (transient errors are retried with backoff), and each partition is replaced atomically, so Ctrl+C or a crash loses at most one chunk and never leaves a torn file.
- Time is stored as a naive timestamp in UTC+7 and partitioned by it, to match
the original dataset.
dead/deletedare booleans (null when false). - Throughput is about 3,400-3,900 ids/s on a home connection (~320k ids/month of HN).
Upload
cp .env.example .env # AWS_*, S3_BUCKET_NAME
upload-to-tigris # uploads partitions that are missing or differ in size
upload-to-tigris --dry-run
delete-from-tigris --dry-run # destructive; wipes the bucket without --dry-run
Development
pip install -e '.[fast,dev]'
pytest # offline, uses a fake HN API
ruff check . && ruff format .
Metadata
Release files for hn-data-fetcher 2.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 |
|---|---|---|---|---|
| hn_data_fetcher-2.0.0.tar.gz | 14.1 kB | With provenance | Details for hn_data_fetcher-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hn_data_fetcher-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for hn_data_fetcher-2.0.0-py3-none-any.whl |
Total release size: 27.8 kB
Release files / hn_data_fetcher-2.0.0.tar.gz
| Download URL | hn_data_fetcher-2.0.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dacc179690e108fd7054b9b3d03e533a2639bc94ea132458f37bf7fc4ac828a
|
|
BLAKE2b-256 checksum How to use checksums |
6d2386be7b75d8125c7ad77cfd25d5efec9c5622d217c7952f5d34fa92d26f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logRelease files / hn_data_fetcher-2.0.0-py3-none-any.whl
| Download URL | hn_data_fetcher-2.0.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
397f68cb189352fe169a8057a9ab1f2c2c9f3e7dcf27b306439bf2d28f4ccde4
|
|
BLAKE2b-256 checksum How to use checksums |
b7aadb560e23178d5fdb5e5100765363364429902f18d5f36bfdb3b6413dd0b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logSecurity for hn-data-fetcher 2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hn_data_fetcher-2.0.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 Nov 4, 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.