Metadata-Version: 2.5
Name: birdalbum
Version: 1.0.0
Summary: Bird of the day from Bird Album (birdalbum.com), plus links to 11,000+ AI-generated bird stickers (CC BY 4.0) and species pages. Standard library only.
Project-URL: Homepage, https://birdalbum.com/developers/
Project-URL: Source, https://github.com/alchaincyf/huashu-bird-sticker
Project-URL: Issues, https://github.com/alchaincyf/huashu-bird-sticker/issues
Author: Bird Album
License-Expression: MIT
License-File: LICENSE
Keywords: bird of the day,birding,birds,illustrations,ornithology,stickers
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# birdalbum

A tiny client for [Bird Album](https://birdalbum.com/), a free bird guide with illustrations of 11,000+ species in 15 languages.

- `bird_of_the_day()` – today's bird: one species per UTC day, the same for everyone
- `sticker()` – the URL of a species' illustration in the open sticker repository
- `species_url()` – the link to a species page on birdalbum.com

Standard library only (`urllib`), Python 3.9+.

```sh
pip install birdalbum
```

```python
from birdalbum import bird_of_the_day, sticker, species_url

bird = bird_of_the_day("ja")
bird["name"]    # name in Japanese (English if there is none)
bird["sci"]     # scientific name
bird["url"]     # species page on birdalbum.com
bird["image"]   # illustration (WebP)
bird["credit"]  # credit line in the same language

sticker("Alcedo atthis")
# 'https://cdn.jsdelivr.net/gh/alchaincyf/huashu-bird-sticker@main/stickers/Coraciiformes/Alcedinidae/Alcedo_atthis.webp'

species_url("common-kingfisher", "zh-Hans")
# 'https://birdalbum.com/zh/birds/common-kingfisher/'
```

Languages: `en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`, `de`, `fr`, `es`, `pt-BR`, `it`, `nl`, `ru`, `sv`, `da`, `pl`. Locale strings such as `ja_JP` or `zh_TW` are mapped to the closest one; anything else falls back to English.

## Command line

```sh
python -m birdalbum        # uses your system language
python -m birdalbum de
```

## Notes

- `bird_of_the_day()` calls `https://birdalbum.com/today.json`. The response also has `names` (all languages), `card` (an SVG card for READMEs) and `license`.
- `sticker()` downloads the sticker index (about 2.6 MB) from jsDelivr on first use and returns `None` for names it does not know. The sticker repository follows the AviList 2026 checklist while the website follows IOC 15.2, so a few species names differ; for today's bird, use `bird["image"]`.
- Network errors are raised as `urllib.error.URLError` (a subclass of `OSError`).

## Credit and license

The illustrations are AI-generated and may contain errors. They are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Please credit: **Illustration: Bird Album (birdalbum.com)**.

This package's code is MIT licensed.

Questions and corrections: [GitHub issues](https://github.com/alchaincyf/huashu-bird-sticker/issues) · [birdalbum.com/developers](https://birdalbum.com/developers/)
