# kerrickstaley/genanki

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kerrickstaley-genanki).**

2,534 stars · 193 forks · Python · mit

## Links

- GitHub: https://github.com/kerrickstaley/genanki
- awesome-repositories: https://awesome-repositories.com/repository/kerrickstaley-genanki.md

## Topics

`anki` `anki-flashcards`

## Description

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.

## Tags

### Education & Learning Resources

- [Flashcard Generators](https://awesome-repositories.com/f/education-learning-resources/flashcard-generators.md) — Implements a programmatic interface for creating flashcard decks and note models compatible with Anki.
- [Programmatic Deck Production](https://awesome-repositories.com/f/education-learning-resources/programmatic-deck-production.md) — Provides a programmatic interface for automating the production of flashcard decks and study materials. ([source](https://github.com/kerrickstaley/genanki/blob/main/setup.cfg))
- [Automation Libraries](https://awesome-repositories.com/f/education-learning-resources/flashcards/automation-libraries.md) — Offers a programmatic interface for automating the generation of study materials and managing note identities.
- [Deck Generators](https://awesome-repositories.com/f/education-learning-resources/flashcards/deck-generators.md) — Creates compatible deck packages containing notes and models for import into flashcard applications. ([source](https://github.com/kerrickstaley/genanki#readme))
- [Note Generators](https://awesome-repositories.com/f/education-learning-resources/flashcards/note-generators.md) — Creates individual memory units by mapping specific data values to fields defined in a note model. ([source](https://github.com/kerrickstaley/genanki/blob/main/README.md))
- [Automated Content Production](https://awesome-repositories.com/f/education-learning-resources/automated-content-production.md) — Generates large volumes of memory units from data sources to avoid manual entry of flashcards.

### Content Management & Publishing

- [Package Exporters](https://awesome-repositories.com/f/content-management-publishing/package-exporters.md) — Bundles notes, CSS templates, and media files into importable package files for flashcard software.
- [Media Reference Linking](https://awesome-repositories.com/f/content-management-publishing/media-management/media-synchronization-tools/media-reference-linking.md) — Pairs external file paths with internal database references to include audio and images in exported packages.

### Data & Databases

- [Collection Exports](https://awesome-repositories.com/f/data-databases/data-import-and-export/collection-exports.md) — Implements utilities to write generated notes directly into a local database to eliminate manual import steps. ([source](https://github.com/kerrickstaley/genanki#readme))
- [Deck Archivers](https://awesome-repositories.com/f/data-databases/data-import-and-export/collection-exports/deck-archivers.md) — Bundles collections of notes into a compatible file format for import into flashcard software. ([source](https://github.com/kerrickstaley/genanki/blob/main/README.md))
- [Deterministic ID Computation](https://awesome-repositories.com/f/data-databases/deterministic-id-computation.md) — Calculates unique note identifiers using deterministic hashing to ensure consistent updates and prevent duplicate entries.
- [Note Identity Management](https://awesome-repositories.com/f/data-databases/note-identity-management.md) — Assigns stable unique identifiers to notes to ensure updates overwrite existing entries instead of creating duplicates. ([source](https://github.com/kerrickstaley/genanki/blob/main/README.md))
- [Schema-Driven Data Modeling](https://awesome-repositories.com/f/data-databases/schema-driven-data-modeling.md) — Uses defined field lists and HTML templates to map raw data into structured flashcard formats.
- [Package Serialization](https://awesome-repositories.com/f/data-databases/sqlite-database-management/package-serialization.md) — Writes note data and model definitions into a SQLite database file compatible with the target application.

### User Interface & Experience

- [Flashcard Model Definitions](https://awesome-repositories.com/f/user-interface-experience/field-customization/model-field-definitions/flashcard-model-definitions.md) — Provides a blueprinting system for specifying flashcard data fields, HTML templates, and custom CSS styling. ([source](https://github.com/kerrickstaley/genanki#readme))
- [Information Card Design](https://awesome-repositories.com/f/user-interface-experience/information-card-design.md) — Defines custom HTML and CSS layouts for study cards to control how information is displayed.

### Part of an Awesome List

- [Application Package Compression](https://awesome-repositories.com/f/awesome-lists/data/compression-and-archiving/application-package-compression.md) — Bundles database files and media assets into Zstd-compressed zip archives using required naming conventions.

### Business & Productivity Software

- [Note Management Utilities](https://awesome-repositories.com/f/business-productivity-software/note-management-utilities.md) — Uses unique identifiers to automate the creation and updating of flashcards without creating duplicates.

### Development Tools & Productivity

- [Addon Development Kits](https://awesome-repositories.com/f/development-tools-productivity/addon-development-kits.md) — Supports the development of plugins that inject notes and data directly into a local collection.
- [Application Plugin Injections](https://awesome-repositories.com/f/development-tools-productivity/application-plugin-injections.md) — Provides a mechanism to inject generated notes directly into a local collection when running as an Anki plugin. ([source](https://github.com/kerrickstaley/genanki/blob/main/README.md))

### Graphics & Multimedia

- [Media Asset Embedding](https://awesome-repositories.com/f/graphics-multimedia/media-asset-embedding.md) — Includes audio and image files within a package and links them to specific fields for display. ([source](https://github.com/kerrickstaley/genanki#readme))

### Software Engineering & Architecture

- [In-Memory Data Injections](https://awesome-repositories.com/f/software-engineering-architecture/in-memory-data-injections.md) — Enables the transfer of data directly into the host application memory when operating as an internal plugin.
