Skip to main content

Anki Addons Dataset

A HuggingFace dataset of addons for the Anki flashcard program.

Install

pip install anki-addons-dataset

Or with uv:

uv tool install anki-addons-dataset   # install the command
uvx anki-addons-dataset info          # or run it once, without installing

This installs the anki-addons-dataset command. The pipeline runs as a sequence of operations:

anki-addons-dataset info
anki-addons-dataset init
anki-addons-dataset download -d 2026-01-01
anki-addons-dataset ai
anki-addons-dataset parse
anki-addons-dataset report
anki-addons-dataset bundle
anki-addons-dataset upload

Operations can also be chained in a single command, running in the given order:

anki-addons-dataset init download -d 2026-01-01 ai parse

ai generates the one-sentence addon summaries. It is the only step that costs money, and it is separate from download so that changing the prompt re-runs the AI calls alone. It reads the snapshots already in history/ and caches every answer under 1-raw/4-ai/; parse then picks the summaries out of that cache without any network access. Without -d it summarizes every snapshot, which is what a changed prompt needs; with -d it summarizes that one snapshot only:

anki-addons-dataset ai -d 2026-01-01

The date must name an existing snapshot, otherwise ai fails. Inside all, -d belongs to download alone: the ai step of all keeps summarizing every snapshot.

Against the default DeepSeek endpoint, ai refuses to run during DeepSeek's peak hours (01:00-04:00 and 06:00-10:00 UTC, Monday through Friday), when the rate is double the off-peak one, and fails with an error naming the window. Chinese public holidays are ignored: they only turn peak hours into off-peak ones, so the check never lets a peak-rate request through.

download scrapes AnkiWeb with a headless browser. Two timeouts (in seconds) can be raised on a slow network:

anki-addons-dataset download -d 2026-01-01 --page-load-timeout 180 --element-wait-timeout 30
Option Default Meaning
--page-load-timeout 120 how long a single page may take to load before the browser gives up
--element-wait-timeout 120 how long to wait for the page content to appear after loading

Sample runs

Testing a change against the whole dataset is slow: thousands of addon pages per snapshot, and the whole history re-parsed. Two limits cut a run down to a slice of it, and combine freely:

anki-addons-dataset download -d 2026-01-01 -w ~/anki-addons-scratch --sample-addons 20
anki-addons-dataset parse report bundle -w ~/anki-addons-scratch
Option Meaning
--sample-addons download and parse only the first N addons, ordered by addon id
--sample-snapshots let ai (without -d)/parse/report/bundle process only the newest N snapshots

Use them with -w so a sampled run lands in a scratch working directory instead of the real one. download records the addon limit in the snapshot, so a later parse/ai/report in its own invocation applies the same limit without the flag being repeated.

A sampled run never uploads: upload on its own is rejected, and all runs through bundle and skips it, so a partial dataset cannot reach HuggingFace.

Configuration

Paths, credentials locations, the HuggingFace target and logging can be set in an optional YAML file at ~/.anki-addons-dataset.yaml (or elsewhere, via -c/--config). Every key is optional; omitted keys keep the defaults shown below, and with no file at all the defaults apply:

working_dir: ~/anki-addons-dataset       # where snapshots and the bundle are kept; -w overrides it
github:
  token_file: ~/.github/token.txt        # GitHub personal access token, read by download/parse
ai:
  endpoint: https://api.deepseek.com     # any OpenAI-compatible endpoint, used by the ai step
  api_key_file: ~/.config/anki-addons-dataset/deepseek-api-key.txt
  model: deepseek-flash
  readme_max_chars: 8000                 # the README is cut to this length before entering the prompt
huggingface:
  repo_id: Ya-Alex/anki-addons           # the dataset upload targets
  synced_dirs: [history, latest]         # the remote folders upload pushes and prunes
logging:
  level: INFO                            # console level; the log file always gets DEBUG
  format: '%(asctime)-15s %(levelname)-8s [%(threadName)-10s] %(message)s'
  file: logs/anki-addons-dataset.log     # relative to working_dir; `false` disables file logging
sample:
  addons: null                           # only the first N addons by id; --sample-addons overrides it
  snapshots: null                        # only the newest N snapshots; --sample-snapshots overrides it

~ and $VAR are expanded in path values. An unknown or misspelled key is an error rather than a silent no-op, so typos surface immediately.

Values resolve as CLI flag > config file > default: -l WARNING overrides logging.level and -w/--working-dir overrides working_dir, --sample-addons/--sample-snapshots override the sample section, but the file still applies when a flag is absent. The info step prints the resolved values.

anki-addons-dataset init download -d 2026-01-01 -w ~/anki-addons-scratch

The HuggingFace token is not part of this file — huggingface_hub reads it from HF_TOKEN or from hf auth login.

Unit-tests Quality Gate Status Coverage

Metadata

Release files for anki-addons-dataset 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anki-addons-dataset 2.0.3
File Size Uploaded
anki_addons_dataset-2.0.3.tar.gz 59.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anki-addons-dataset 2.0.3
File Interpreter ABI Platform
anki_addons_dataset-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 147.3 kB

Release files / anki_addons_dataset-2.0.3.tar.gz

Download URL anki_addons_dataset-2.0.3.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8de2831f3450cfd03a359c4d2676bace3639555273dedb63eda5fbe94d9490ca
BLAKE2b-256 checksum
How to use checksums
d8a74941d015b7d108e131f9b45b99cbd108ea2579c2c7fdcf56231a777017af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release files / anki_addons_dataset-2.0.3-py3-none-any.whl

Download URL anki_addons_dataset-2.0.3-py3-none-any.whl
Size 88.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1c10c4cbcfabe8b8c34d011b376a4f4eeb3a0de380ec9a89c93ac22cc9c9de8
BLAKE2b-256 checksum
How to use checksums
a1249cadd571faf47034ae182042fd0861178e5ea86f4629a03fa333dd0e57f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.4

2 release files

This release

2.0.3 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page