1.0.0
This v1.0 release delivers a major modernization of afsapi: typed endpoint access, stronger error handling, safer XML parsing, cleaner async session lifecycle, updated packaging, and a new recorded integration test workflow.
Highlights
- Refactored the core async client with typed endpoint access patterns.
- Added typed node registry for FSAPI paths and response value mapping.
- Improved request/session handling with reusable HTTP sessions and async context support.
- Added structured FSAPI response parsing and status-to-exception mapping.
- Modernized project packaging, dependency management, and CI workflows.
- Added cassette-based integration tests for both read and write device flows.
New in v1.0
- New endpoint model and registry via Endpoint, ListEndpoint, and Nodes.
- New response utilities for status parsing and XML field extraction.
- New constants for validated bounds (bass, treble, play rate).
- New playback models:
- PlayRepeatMode
- PlayCaps
- Added robust replay-first device integration testing with pytest-recording cassettes.
Breaking Changes
- Exception renames:
- FSApiException -> FSApiError
- NotImplementedException -> FSNotImplementedError
- ConnectionError -> FSConnectionError
- OutOfRangeException -> OutOfRangeError
- InvalidPinException -> InvalidPinError
- InvalidSessionException -> InvalidSessionError
- Playback control update:
- Removed PlayControl.STOP_START
- Use PlayControl.STOP and play() explicitly
- Model typing changes:
- PlayerMode.key is now int
- Equaliser.key is now int
- Validation updates:
- play_repeat now validates explicit modes (0, 1, 2)
- set_bass, set_treble, and set_play_rate enforce bounds
- Minimum Python version is now 3.10.
Packaging and Tooling
- Migrated to modern pyproject-based project metadata.
- Removed legacy packaging files (setup.py, setup.cfg, requirements.txt).
- Runtime dependencies now include aiohttp and defusedxml.
- Added uv dependency groups and committed lockfile.
- Consolidated lint/type/test configuration for ruff, mypy, and pytest.
Migration Notes
- Update imports to the new exception names.
- Replace STOP_START usages with STOP and explicit play calls.
- Update any code expecting string mode/EQ keys to use integers.
- Prefer the typed Nodes-based get/set patterns for new integrations.
- Run on Python 3.10 or newer.
Test Notes
- Device tests replay recorded cassettes by default.
- Live device runs and recording require AFSAPI_DEVICE_IP, AFSAPI_DEVICE_PIN, and --run-device-tests.