Genanki is a Python library for programmatically generating flashcard decks, note models, and compatible package files for Anki. It functions as a flashcard automation library that allows for the creation of individual memory units by mapping data to defined note models.
The library distinguishes itself through a system for managing stable, unique identifiers using deterministic hashing, which ensures that updates overwrite existing entries rather than creating duplicates. It provides utilities to bundle notes, CSS styling, and media assets into compressed archives or inject data directly into a local database.
The project covers the full lifecycle of study material production, including note model definition with HTML templates, media file embedding, and the serialization of data into SQLite-based packages. It also supports the development of addons for direct collection injection.