anki
Python library for Anki, the spaced repetition flashcard program
Decision gist · record as of 2026-08-14
Yes, if you are building Anki add-ons, automating flashcard workflows, or need programmatic access to spaced-repetition scheduling. The library is actively maintained, well-established (29756 stars), and has no known vulnerabilities. The AGPL-3.0-or-later license requires that derivative works be open-source; verify this aligns with your project before use. Medium install friction (compiled wheels, Python 3.10+ required) is a minor trade-off for core functionality.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; platform-specific compiled wheels (macOS, Linux, Windows); Anki collection file path must exist and be readable.
- Medium install friction due to compiled wheels (abi3, platform-specific); active maintenance with recent release (9 days old) and strong repository signals (29756 stars, last commit 2026-08-14).
- Requires Python 3.10+.
License · maintenance · safety
AGPL-3.0-or-later (agpl) — AGPL-3.0-or-later: derivative works and modifications must be released under AGPL. Suitable for open-source projects and add-ons; proprietary applications using this library must comply with copyleft obligations or seek alternative licensing.
last release 2026-08-05 (9 days) · last repo commit 2026-08-14 · 29,756 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 276,344 downloads/mo, #8,165 on PyPI
Alternatives
Verify before relying
pip install anki
from anki import Collection
col = Collection('/path/to/collection.anki2')
notes = col.find_notes('deck:Default')
print(len(notes))- Whether the Rust backend is bundled in the wheel or requires separate installation.
- Performance characteristics when working with large collections (thousands of cards).
- Stability guarantees for the Python API across minor version updates.
What it is and what it does
Anki is a Python library that exposes the core scheduling and database engine behind Anki, the popular spaced-repetition flashcard application. It wraps a Rust backend (rslib) and provides a programmatic interface to collections, notes, cards, decks, scheduling algorithms (FSRS/SM-2), media management, import/export, and synchronisation with AnkiWeb. The library is primarily used by Anki add-on developers and anyone building automation or custom workflows around flashcard learning.
The package depends on seven runtime libraries: decorator, distro, markdown, orjson, protobuf, requests, and typing-extensions. It requires Python 3.10 or later and ships as platform-specific compiled wheels (macOS ARM64/x86-64, Linux aarch64/x86-64, Windows amd64/ARM64). Installation has medium friction due to these compiled dependencies, but the project is actively maintained with a large, engaged community.
Use it for
- Build Anki add-ons that extend the desktop application with custom scheduling, UI, or data-processing features.
- Automate flashcard generation and bulk import from external data sources into Anki collections.
- Create custom spaced-repetition learning applications that leverage Anki's scheduling algorithms.
- Programmatically query and analyse learning statistics from existing Anki collections.
- Synchronise flashcard data between Anki and external learning platforms or databases.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building Anki add-ons, automating flashcard workflows, or need programmatic access to spaced-repetition scheduling.
The library is actively maintained, well-established (29756 stars), and has no known vulnerabilities. The AGPL-3.0-or-later license requires that derivative works be open-source; verify this aligns with your project before use. Medium install friction (compiled wheels, Python 3.10+ required) is a minor trade-off for core functionality.
Install
anki on PyPI
Before you install
Medium install friction due to compiled wheels (abi3, platform-specific); active maintenance with recent release (9 days old) and strong repository signals (29756 stars, last commit 2026-08-14). Requires Python 3.10+.
Requires Python 3.10 or later; platform-specific compiled wheels (macOS, Linux, Windows); Anki collection file path must exist and be readable.
License in practice
AGPL-3.0-or-later: derivative works and modifications must be released under AGPL. Suitable for open-source projects and add-ons; proprietary applications using this library must comply with copyleft obligations or seek alternative licensing.
Quickstart
pip install anki
from anki import Collection
col = Collection('/path/to/collection.anki2')
notes = col.find_notes('deck:Default')
print(len(notes))
Verify before relying
- Whether the Rust backend is bundled in the wheel or requires separate installation.
- Performance characteristics when working with large collections (thousands of cards).
- Stability guarantees for the Python API across minor version updates.
Package facts
| License | AGPL-3.0-or-later agpl |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 7 packagesdecoratordistromarkdownorjsonprotobufrequeststyping-extensions |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 276,344 / month, #8,165 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: anki-26.8.1-cp310-abi3-macosx_12_0_arm64.whl; anki-26.8.1-cp310-abi3-macosx_12_0_x86_64.whl; anki-26.8.1-cp310-abi3-manylinux_2_35_aarch64.whl; anki-26.8.1-cp310-abi3-manylinux_2_35_x86_64.whl; anki-26.8.1-cp310-abi3-win_amd64.whl; anki-26.8.1-cp310-abi3-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “anki flashcard api”
- ankiProvides Python access to Anki's core spaced-repetition engine,…
- aqtaqt is the Qt-based desktop GUI for Anki, the spaced repetition…
- genankiGenerates Anki flashcard decks programmatically in Python, allowing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also aqt · fsrs · genanki · browser-use-core · anchorpy-core · schedule · APScheduler · Flask-APScheduler · flpc · aiorecollect