addon-harvester
Harvests add-on/package metadata from PyPI (any trove classifier) and npm (search
queries) into one normalised JSON snapshot (index.json, schema_version 3) with a
0–100 health score per add-on. Std-lib only, no framework dependency. PyPI is enumerated
via the public BigQuery dataset (the only non-deprecated bulk API); XML-RPC browse and
the Simple index remain as fallbacks.
The search terms live in harvest.toml — point them at any ecosystem
("Framework :: Django", "Framework :: Zope", ...). The shipped default is the
Plone profile: Framework :: Plone plus npm queries for Volto/Aurora and
Nick add-ons (npm hits are tagged with their ecosystem
as category), with Plone-specific enrichments (version compat, add-on categories,
backend/frontend pairing) that simply stay empty for other ecosystems.
Docker (production, refresh every 4 h)
1. .env in the repo root:
BIGQUERY_PROJECT=my-gcp-project
GITHUB_TOKEN=ghp_... # optional: GitHub stars/last-commit enrichment
2. GCP service-account key at secrets/gcp-key.json (one-time):
gcloud iam service-accounts create harvester --project=$PROJECT
gcloud projects add-iam-policy-binding $PROJECT \
--member="serviceAccount:harvester@$PROJECT.iam.gserviceaccount.com" \
--role=roles/bigquery.jobUser
gcloud iam service-accounts keys create secrets/gcp-key.json \
--iam-account=harvester@$PROJECT.iam.gserviceaccount.com
3. Run:
docker compose up -d --build
docker compose logs -f harvester
The container harvests once at startup, then every 4 hours (docker/crontab), writing to
./data/index.json. Harvest flags live in HARVEST_ARGS in docker-compose.yml.
Without a key file the harvester falls back to the deprecated XML-RPC API.
Local development
make install # venv + package + dev extras (Python ≥ 3.14)
make test # pytest — offline, all network mocked
make lint # ruff
make harvest # full run (ARGS="--limit 20" to override)
For BigQuery enumeration locally, log in once with gcloud auth login and set
BIGQUERY_PROJECT in .env — tokens are minted automatically per run.
As a library (no I/O, snapshot returned in memory):
from addon_harvester import Harvester, HarvestOptions, write_snapshot
snapshot = Harvester(HarvestOptions(limit=20)).run()
write_snapshot(snapshot, "index.json")
Configuration
| Where | What |
|---|---|
harvest.toml |
search terms: PyPI trove classifiers + npm search queries (--classifier overrides the classifiers, --config for another file) |
.env |
BIGQUERY_PROJECT, GITHUB_TOKEN/GH_TOKEN, optional BIGQUERY_TOKEN |
python main.py --help |
all CLI flags (sources, limit, workers, output, ...) |
Every CLI run writes its full log to var/log/harvest-<timestamp>.log (newest 20 kept);
-v only controls console verbosity.
Architecture
src/addon_harvester/
├── harvester.py orchestration → snapshot (no I/O)
├── sources/ pypi (BigQuery → XML-RPC → Simple), npm, github enricher, bigquery client
├── normalizers/ raw registry document → TAddon
├── healthscore/ health score (rubric: healthscore/config.py)
└── http.py retrying JSON client with per-thread keep-alive · config.py · types.py
Each source implements list_packages / fetch_package / fetch_downloads /
normalize; HarvestBase.harvest() drives them identically. main.py is the CLI
wrapper, Makefile the task runner.
Release
make build # sdist + wheel into dist/
make publish # upload to PyPI (needs credentials)
Metadata
Release files for addon-harvester 1.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 | Actions |
|---|---|---|---|---|
| addon_harvester-1.1.0.tar.gz | 40.7 kB | With provenance | Details for addon_harvester-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| addon_harvester-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for addon_harvester-1.1.0-py3-none-any.whl |
Total release size: 75.8 kB
Release files / addon_harvester-1.1.0.tar.gz
| Download URL | addon_harvester-1.1.0.tar.gz |
|---|---|
| Size | 40.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c830f0b7ac3344a905ee8c038eae194d3b1481b9ef2bc8c1d4dc8d96c43681e
|
|
BLAKE2b-256 checksum How to use checksums |
e57bc227f7682890185b57a7bb01cfadd58fb74e6ae5c14fc7ccd0b28eb7b53b
|
| 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 11, 2026.
Transparency logRelease files / addon_harvester-1.1.0-py3-none-any.whl
| Download URL | addon_harvester-1.1.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a11a783b7b75de3c5d1d53500ccf2c8a8e6e3612413b89de4777f137eb10bd6
|
|
BLAKE2b-256 checksum How to use checksums |
364b121ba52b36914787217ce7a1427140643bfd07a556f0c09d48db691e69ad
|
| 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 11, 2026.
Transparency logSecurity for addon-harvester 1.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
Both files in this release have been uploaded with provenance metadata.
Attestation for addon_harvester-1.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 11, 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.