Skip to content

v3.0.0

Latest

Choose a tag to compare

@MeGaNeKoS MeGaNeKoS released this 21 Feb 19:25
v3.0.0
d500b8e

Anisearch v3.0.0

BREAKING: execute() now returns typed dataclass objects instead of raw dicts.

Highlights

  • Typed responses — access fields via attributes (result.id, result.title.english) with full IDE autocomplete
  • Dataclass models for all entity types: Media, Character, Staff, Studio, PageResult
  • Return type annotations and docstrings on all builder methods for IDE support
  • Proper type hints on all connection parameters using enums
  • Duplicate field detection at compile time
  • Default sub-selections for connections without fields= lambda
  • Snake-to-camelCase auto-conversion for mutation keyword arguments

Breaking Changes

  • execute() returns typed objects instead of dict — update code that accesses result["data"]["Media"] to use result.title.romaji etc.

Migration

# Before (v2.x)
result = api.media(id=1).title("romaji").execute()
title = result["data"]["Media"]["title"]["romaji"]

# After (v3.0)
result = api.media(id=1).title("romaji").execute()
title = result.title.romaji

See README for full usage docs.