Portions of Anki's backend written in Python. Please see https://github.com/ankitects/anki-desktop