AviAnki
Build Flashcards with Birds Near You
Pick a region and AviAnki builds an Anki deck for learning its birds by photo and by sound, with the most common species first. The photos and recordings come from a ready-made catalog that is rebuilt every month from freely licensed sources, so making a deck is a quick download: no scraping, no API key and no ffmpeg on your machine.
Quick start
uvx avianki us-ma
An .apkg file (AviAnki-us-ma.apkg) is written to the current directory. Open it in Anki by double-clicking it or with File > Import.
You need uv. Without it, pip install avianki and then avianki us-ma does the same thing.
REGION is a catalog region: its slug (us-ma, ca-qc) or its display name (Massachusetts). If the name is not in the catalog, the error lists the closest matches.
Cards
Every deck is built from three kinds of card; you choose which with --cards.
| Card type | --cards value |
Front |
|---|---|---|
| Photo | photo |
a photo of the bird |
| Audio | audio |
a recording of the bird |
| Photo + audio | photo-audio |
the photo and the recording |
Every back is the same: the name and scientific name, the photo, the recording, and the credit for each.
The default is photo,audio. A species with no photo (or no recording) simply gets no photo (or audio) card, and the run says so: the summary adds a line such as "3 of the 100 birds have no recording, so they have photo cards only." for each kind that some species lack. Fronts never show the bird's name. Every answer credits the author and licence of each asset on the card.
Options
| Flag | Short | Description |
|---|---|---|
REGION |
Catalog region: slug (us-ma) or display name (Massachusetts). Required unless --ebird is given |
|
--tier TIER |
standard: the 100 most common species (default). everything: the region's 400 most common (upper or lower case both work) |
|
--cards TYPES |
Comma-separated card types: photo, audio, photo-audio (default: photo,audio) |
|
--month 1-12 |
Only species likely to be seen in this month (default: all year) | |
--subdeck |
Put new notes in a subdeck named after the region (AviAnki::<Region>); see the note below |
|
--ebird CODE |
Build from any eBird region code instead of the catalog; see Any eBird region | |
--output FILE |
-o |
Where to write the deck (default: AviAnki-<region>.apkg, or AviAnki-<CODE>.apkg with --ebird); ~ works, a missing folder is created, and an existing file is replaced |
--catalog-url URL_OR_DIR |
Where to read the catalog: a URL or a local directory (default: the published catalog) | |
--cache-dir DIR |
Where downloaded catalog files are kept (default: your per-user cache directory); ~ works |
|
--deck-name NAME |
The deck's name (default: AviAnki); it cannot be empty, and :: makes a subdeck; see the warning below |
|
--verbose |
-v |
Show debug output and tracebacks |
--quiet |
-q |
Show only warnings and errors; also hides the progress bar |
--version |
Print the version and exit |
-v and -q cannot be combined. The exit status is 0 when a deck was written, 1 for a network or catalog problem or when there was nothing to write, 2 for a usage error (including an output path that cannot be written, which is checked before anything is downloaded), and 130 when you cancel with Ctrl-C. The progress bar is only drawn in a terminal, so redirected output stays clean.
Changing --deck-name puts the notes into a different deck in Anki, so a later import will not update the notes you already have. Leave it alone unless you want a separate deck.
--subdeck only affects birds that are not in your collection yet. Anki leaves a bird you already have in the deck it is in, so importing with --subdeck into a collection that already holds those birds moves nothing. To reorganise existing cards, move them in Anki's card browser (select them, then Change Deck).
Examples
# The 100 most common birds of Massachusetts, photo and audio cards
uvx avianki us-ma
# Every Massachusetts species, with all three card types
uvx avianki "Massachusetts" --tier everything --cards photo,audio,photo-audio
# What Arizona birders see in May, in their own subdeck
uvx avianki us-az --month 5 --subdeck
# Photo cards only, in a chosen file
uvx avianki ca-qc --cards photo -o ~/Desktop/quebec.apkg
# A deck for a county, straight from eBird (needs EBIRD_API_KEY; for personal use only)
uvx --with "avianki[catalog]" avianki --ebird US-MA-017
Updating a deck
Decks are built to be re-imported. Every note has a fixed identity, so importing a newer build of the same region updates the notes you already have and keeps your review progress. Going from standard to everything adds only the extra species. Keep the default --deck-name for this to work.
Any eBird region
The catalog covers the regions listed in it. For anything else, give --ebird an eBird region code (US-MA, US-MA-017, CA-QC, MX-ROO):
EBIRD_API_KEY=your_key uvx --with "avianki[catalog]" avianki --ebird US-MA-017
- Get a free key at ebird.org/api/keygen and put it in the environment or in a
.envfile (see.env.example). Only--ebirdneeds it. - Species that are in the catalog reuse its photos and recordings. Species that are not are built on the spot, which needs the
avianki[catalog]extra. Audio for those also needs ffmpeg on yourPATHand theavianki[verify]extra (BirdNET, Python 3.11 to 3.13). Without them the run degrades to photos and says so. - The species come in eBird's order, so
standardis the first 100 that eBird returns, andeverythingis every species eBird lists for the region. - The deck is for personal use only. Every
--ebirdrun prints: "Built from eBird data for personal use. eBird's terms don't allow redistributing this deck." The catalog decks, by contrast, contain only openly licensed media and species lists.
Credits and licences
Every photo and recording in the catalog decks is openly licensed, and the answer side of each card names the author and the licence. The catalog itself publishes a credits page listing every asset. Media comes from Wikipedia and Wikimedia Commons, with iNaturalist as a fallback; species lists are derived from eBird occurrence data published through GBIF.
Thanks to Cornell Lab of Ornithology
The species lists behind AviAnki's regions, and the eBird API used by --ebird, come from eBird, the citizen-science project of the Cornell Lab of Ornithology. Their work makes tools like this possible.
Get involved — Cornell Lab runs some of the world's largest citizen science programs. You can contribute bird sightings through eBird, join community science projects like Project FeederWatch and NestWatch, or participate in the annual Christmas Bird Count. Every observation helps researchers track bird populations and protect habitat.
Donate — Consider supporting the Cornell Lab directly: give.birds.cornell.edu.
If you find AviAnki useful, consider supporting its development at buymeacoffee.com/IanCosta.
Contributing
See CONTRIBUTING.md.
Metadata
Release files for avianki 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| avianki-0.10.0.tar.gz | 165.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| avianki-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 358.1 kB
Release files / avianki-0.10.0.tar.gz
| Download URL | avianki-0.10.0.tar.gz |
|---|---|
| Size | 165.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71c42042f0a01f2b62500453d337a064f38cfc71098e594b5eabeeef2ef13edd
|
|
BLAKE2b-256 checksum How to use checksums |
27fcf913d5db3abae04b79404cc8893dc392dfdfad4ddee5431f2106506f3537
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / avianki-0.10.0-py3-none-any.whl
| Download URL | avianki-0.10.0-py3-none-any.whl |
|---|---|
| Size | 192.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a81c8dff3d772add29622d8bc23551d657047433200d485ed7f02910649b0c1
|
|
BLAKE2b-256 checksum How to use checksums |
9fc2f77b2443351c2ff6ddade099cd715c3d4c88b237b899791c4b7ed035fcc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|