Skip to content

Improv2 - #4

Merged
zas merged 5 commits into
mainfrom
improv2
Mar 24, 2026
Merged

zas merged 5 commits into
mainfrom
improv2

Conversation

@zas

@zas zas commented Mar 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

zas added 5 commits March 24, 2026 15:02
- MBModel.model_post_init logs unmapped fields at DEBUG level
- Set MUSICBRAINZPY_DEBUG=1 to enable debug logging on import
- Useful for discovering new API fields before they get typed attributes
- Document MUSICBRAINZPY_DEBUG in README and api-reference env vars tables
Add fields returned by lookups (with inc=), searches, and browses
that were not yet mapped in the Pydantic models:

- AreaStub: type, type-id, life-span, iso-3166-2-codes
- ArtistStub: country, aliases, tags, genres
- Alias: begin-date, end-date
- Artist: score, releases, release-groups, recordings, works
- Recording: aliases, releases, score, video optional, artist-credit-id
- Release: aliases, score, track-count, count, artist-credit-id, Disc model
- ReleaseGroup: aliases, score, count, artist-credit-id, type-id
- Label: score, releases
- LabelStub: type, type-id, sort-name, label-code, aliases, tags, genres
- ReleaseGroupStub: type-id, first-release-date, artist-credit, aliases, tags, genres
- Medium: id, discs
- Work: score, relations
- Event: score, relations
- Place: score
- Series: score

artist-credit-id is a UUID string, not int.

Recording.releases, Label.releases, Work.relations, Event.relations
use list[MBModel] to avoid circular imports.

Include missing_fields_checker.py example script that queries all
entity types against the live API and reports unmapped fields.
Replicates all information shown on a MusicBrainz recording page:
recording info, ISRCs, rating, genres/tags, artist relationships
(performers, engineers, producers), studio locations, external
links, related work (composer/lyricist, publishers), and all
releases the recording appears on.

Default MBID: Pink Floyd - The Post War Dream (original studio mix)
Accepts any recording MBID as CLI argument.
Every request through _raise_for_status now logs a one-liner:
  musicbrainzpy GET /ws/2/artist/... 200 0.169s

Also fix MUSICBRAINZPY_DEBUG to attach a StreamHandler when no
handlers exist, so debug messages actually appear on stderr.
@zas
zas merged commit cae0cba into main Mar 24, 2026
15 checks passed
@zas
zas deleted the improv2 branch March 24, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant