Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyclassicalarchives

A typed Python client for Classical Archives, one of the largest classical music catalogues on the web.

The library wraps the site's public JSON API in dataclasses. Use it to browse curated and full A-Z composer lists, search by name, and fetch a composer's full page (biography, period, lifedates, albums, and works). Every model exposes a canonical id for de-duplication, and an optional metadatarr provider cross-references that id with other sources.

Install

pip install pyclassicalarchives
pip install pyclassicalarchives[stealth]   # adds curl-cffi (Chrome TLS), if ever gated
pip install pyclassicalarchives[dev]       # adds pytest

30-second tour

import pyclassicalarchives as ca

# Curated lists
for c in ca.get_notable_composers()[:5]:
    print(c.composer_id, c.display_name, c.country, c.birth, c.death)

# Search by name (surname-first or natural order both work)
bach = ca.search_composers("johann sebastian bach")[0]

# Full page: bio, period, albums, works
detail = ca.fetch_composer(bach.composer_id)
print(detail.life, detail.period)                 # (1685-1750) Baroque
print(len(detail.albums), "albums,", len(detail.works), "works")

# Canonical ids for dedup / cross-referencing
print(detail.to_external_ids_dict())
# {'classicalarchives_composer': '2113', 'classicalarchives_url': '.../composer/2113.html'}

What you can fetch

Function Returns Source endpoint
get_notable_composers() List[Composer] composer_list_notable.json
get_must_know_composers() List[Composer] mustknow_composers.json
get_composers_by_letter("B") List[Composer] composer_list_all.json?letter=
iter_all_composers() Iterator[Composer] the whole A-Z catalogue (lazy)
search_composers("mozart") List[Composer] client-side over the by-letter lists
fetch_composer(id) ComposerDetail composer_page.json?composer_id=

A ComposerDetail carries nested albums: List[Album] and works: List[Work]. The library flattens the works tree to leaf works, and tags each one with its full category path.

Documentation

Start with docs/quickstart.md, then:

Runnable, numbered scripts live in examples/.

Canonical ids and metadatarr

This package is a pure scraper. It exposes Classical Archives' stable ids through site_id and to_external_ids_dict():

bach = ca.search_composers("johann sebastian bach")[0]
bach.to_external_ids_dict()
# {'classicalarchives_composer': '2113',
#  'classicalarchives_url': 'https://www.classicalarchives.com/composer/2113.html'}

The metadatarr resolver consumes these ids. The MetadataProvider itself lives in the metadatarr repo (metadatarr/resolve/providers/classicalarchives.py), not here, so integration code stays out of client repos. Install both packages and metadatarr auto-discovers the provider. See docs/canonical_ids.md.

Metadata

Release files for pyclassicalarchives 0.0.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyclassicalarchives 0.0.1a2
File Size Uploaded
pyclassicalarchives-0.0.1a2.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyclassicalarchives 0.0.1a2
File Interpreter ABI Platform
pyclassicalarchives-0.0.1a2-py3-none-any.whl Python 3 none any Details

Total release size: 35.7 kB

Release files / pyclassicalarchives-0.0.1a2.tar.gz

Download URL pyclassicalarchives-0.0.1a2.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
52a19110898896de0dd781389fff78e3f87f494b530948ee6dd00d2afbeea889
BLAKE2b-256 checksum
How to use checksums
b135d6acf4b9b7e396e70ac4371711b666cb63eeca8a85ca6946d0593b2719ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyclassicalarchives-0.0.1a2-py3-none-any.whl

Download URL pyclassicalarchives-0.0.1a2-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11040be25023969768f8dbd912e5e88e963c5c720448dc52042d235618e00e07
BLAKE2b-256 checksum
How to use checksums
0cef9daa461fb368b09af27955a8080690f050fbcfd843f02d583810c2c36d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.0.1a2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page