mirror of
https://github.com/ankitects/anki.git
synced 2026-06-10 06:13:34 -04:00
## Linked issue Closes #4815 ## Summary This adds [Complexipy](https://github.com/rohaquinlop/complexipy) for detecting complex Python code: - The `check:complexity` Ninja actions use a high threshold (50) for now to avoid failing on existing complex code. - `just complexipy-diff` is intended for linting new code in PR CI and uses 15 as the threshold. See https://rohaquinlop.github.io/complexipy/usage-guide/#ratchet-mode ## How to test - Run `./ninja check:complexity` locally and confirm it passes. - Test diff mode: `just complexipy-diff main`.
Anki
Core Python library for Anki, the spaced repetition flashcard program.
About
Anki is a spaced repetition program that helps you remember things efficiently. This package contains the Python layer of Anki's core: it wraps the Rust backend (rslib) and exposes the primary API used by the desktop app and add-ons alike.
It provides access to:
- Collection — open, read, and write an Anki
.anki2database - Notes & Cards — create, update, and query notes and cards
- Decks & Models — manage deck configurations and note types
- Scheduler — the FSRS/SM-2 scheduling algorithms
- Media — media file management and sync
- Import / Export — support for
.apkg,.colpkg, and other formats - Sync — synchronisation with AnkiWeb
- Hooks — event system for extending behaviour
Installation
pip install anki
Note:
ankiis the headless library. If you want the full desktop application, installaqtinstead, which depends on this package.
Add-on development
If you are building an Anki add-on, this is the package that gives you access to the collection and scheduling internals. See the Add-on Guide for full documentation.
Contributing
Want to contribute? Check out the Contribution Guidelines and the Development Guide.