pkgreach
How are your packages really used? pkgreach tracks your packages on PyPI, npm, crates.io and GitHub every week, keeps the history the registries throw away, and publishes a report that separates robots from people.
Live example (the author's packages): https://thorwhalen.github.io/pkgreach/
Why
Registries keep a few months of daily download counts (crates.io 90 days, PyPI about 6 months, npm 18 months), and none of them separates people from robots: mirrors, CI pipelines and scanners download every release of every package. So pkgreach reports downloads against a noise floor (what your least-used packages get), next to the signals a robot does not create: dependents (packages and repositories that declare yours, from ecosyste.ms), and stars and forks of your public repositories.
Quick start: a weekly GitHub Action
In any repository you own (it can be public: everything collected is public already):
pip install pkgreach
pkgreach init . --pypi YOUR_PYPI_USER --npm YOUR_NPM_USER --github YOUR_GITHUB_USER YOUR_ORG
git add -A && git commit -m "pkgreach" && git push
pkgreach init writes pkgreach.toml (what to follow) and .github/workflows/pkgreach.yml. Then turn on Pages once (Settings → Pages → Source: GitHub Actions) and run the workflow (gh workflow run pkgreach.yml). Every Sunday after that it collects, commits the history to the pkgreach-data branch, and publishes the report on your GitHub Pages. No secret is needed.
The workflow is three steps:
- uses: actions/checkout@v4
- uses: thorwhalen/pkgreach@<version> # pin the release you installed
id: reach
- uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.reach.outputs.site-dir }}
- uses: actions/deploy-pages@v4
Configuration
pkgreach.toml has one table per platform: pypi, npm, crates, github. Every key is optional; unknown keys are refused, so a typo never silently does nothing.
[pypi]
users = ["alice"] # every package these accounts own or maintain
packages = ["a-package-of-a-friend"] # plus these
exclude = ["alice-test-*"] # minus these (glob patterns)
[npm]
users = ["alice"]
[crates]
users = ["alice"] # crates.io login
[github]
users = ["alice", "alice-org"] # public repos of these users and orgs
where = { fork = false, archived = false } # characteristics a package must have
where matches the metadata of listed packages field by field (GitHub repos have fork, archived, language; PyPI packages have role, owner or maintainer); packages named in packages are always kept. PyPI names are normalized (Flask_Login is flask-login). Top-level keys: max_workers (default 4) and dependents (default true: ask ecosyste.ms).
The Action's inputs: config, data-branch (default pkgreach-data), site-dir, title, token (reads GitHub; defaults to the workflow's token), commit, fail-on-errors (default false: a failed package is listed in last_run.json and flagged on the page, and the run stays green).
Run it locally
pkgreach collect --config pkgreach.toml # into ~/.local/share/pkgreach/data
pkgreach report --out site # site/index.html and site/summary.json
pkgreach init . --pypi me --github me my-org # a config and a weekly workflow
From Python, every part is a keyword argument with a working default:
from pkgreach import collect, load_settings, build_site, Files, PLATFORMS
collect(load_settings("pkgreach.toml"), store=Files("data"))
build_site(Files("data"), Files("site"))
collect(platforms=...)andsummarize(platforms=...): add a platform withPlatform(name, list_packages, fetch, kind=..., headline=...); seepkgreach/platforms/__init__.pyfor the contract. A"snapshot"platform (current values only, like Hugging Face likes) is shown by itsheadlinemetrics.collect(select=lambda platform, record: ...): any selection a TOML file cannot express.collect(dependents=...): another source of dependents.build_site(analyze=...): your own summary;summary.jsonis the default one, for any other tool.make_http(headers_by_host=...): credentials per host (the CLI gives GitHubGITHUB_TOKENorGH_TOKEN).store=/out=: anyMutableMapping[str, str], such as a dol store (S3, a database).
What is collected
| platform | daily downloads | other numbers | source |
|---|---|---|---|
| PyPI | all, and without mirrors | versions, dependents | pypistats.org, PyPI JSON, ecosyste.ms |
| npm | all | dependents | api.npmjs.org, ecosyste.ms |
| crates.io | all | total downloads, versions, dependents | crates.io, ecosyste.ms |
| GitHub | none | stars, forks, open issues and PRs | GitHub REST (public repos only) |
The history is plain CSV, one table per kind, split by year (downloads/YYYY.csv, metrics.csv, packages.csv, runs.csv), merged idempotently so re-running a collection never changes the result. manifest.json lists every file and its columns. Design and alternatives: docs/adr/0001-seams-and-scope.md. What each platform offers, verified: docs/research/platform-apis.md.
GitHub traffic (views, clones, referrers) is private and needs a token with push access. That is ghtraffic's job, in a private repository; pkgreach reuses its storage layer.
Dependents data is from ecosyste.ms, licensed CC BY-SA 4.0; the report credits it and the history carries a DATA-LICENSE.md. A repository that stops being listed (made private, deleted, or dropped from the selection) leaves the current tables at the next run; what was committed before stays in the branch's git history.
Limits
- History starts at your first run, minus what the registry still keeps.
- One run of about 400 packages takes about 7 minutes, mostly waiting on pypistats.org's limit of 60 requests a minute.
- Listing a PyPI account uses PyPI's XML-RPC
user_packages, deprecated but still answered. - Dependents come from ecosyste.ms, which indexes new packages with some delay: a fresh package shows none at first.
Metadata
Release files for pkgreach 0.0.3
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 |
|---|---|---|---|---|
| pkgreach-0.0.3.tar.gz | 35.8 kB | Without provenance | Details for pkgreach-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pkgreach-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pkgreach-0.0.3-py3-none-any.whl |
Total release size: 74.2 kB
Release files / pkgreach-0.0.3.tar.gz
| Download URL | pkgreach-0.0.3.tar.gz |
|---|---|
| Size | 35.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
927eab67079494bf164953417313f9d94c1b49bc5d16a76b8afbeca9477edb6c
|
|
BLAKE2b-256 checksum How to use checksums |
8d86a70df686357c7ce340920ff86cff3bf19d9e5cbb87991c9f6fe9b607b3b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pkgreach-0.0.3-py3-none-any.whl
| Download URL | pkgreach-0.0.3-py3-none-any.whl |
|---|---|
| Size | 38.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32aab90a66b0804eec1737d973504cebddc7ea9c21c719d108364c0d719e1c84
|
|
BLAKE2b-256 checksum How to use checksums |
4484960b1d6c80590ecf021a6b5857924c3ae645df028c45cec8e63cdab4e85d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pkgreach 0.0.3
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.