You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v1.1.0: Add first-class async client support and streamline documentation
Goal
Version 1.1.0 will add first-class asynchronous support to python-mlb-statsapi while preserving the existing synchronous Mlb API and the stable 1.x behavioral contract introduced in version 1.0.0.
The async implementation should reuse the existing models, exceptions, endpoint semantics, and response parsing wherever practical rather than creating a separate project or independently maintained implementation.
Version 1.1.0 will also streamline the README so new users can understand and start using the library without working through detailed transport and API documentation first.
A downstream implementation issue is not complete if its relevant #298 contract obligations are unimplemented or untested, even if the basic feature appears to work.
Architecture
Avoid maintaining two independent copies of endpoint parsing and model-construction logic.
Once the architecture is validated, async endpoint coverage can expand systematically.
Full endpoint parity is not required before the architecture itself has been proven.
Packaging
Async dependencies should preferably be optional so existing users do not receive additional HTTP dependencies simply by upgrading.
Desired installation model:
pip install python-mlb-statsapi
for the synchronous client, and something similar to:
pip install "python-mlb-statsapi[async]"
for async support.
The exact async transport library should be selected as part of #300 according to the requirements established in #298 rather than assumed by this parent issue.
Documentation and README cleanup
The current README contains increasingly detailed HTTP, transport, migration, and API information.
Version 1.1.0 should simplify it around the information most users need first:
Installation
Python support
Basic synchronous usage
Basic asynchronous usage
Common error handling
Links to detailed documentation
Contribution/project links
More detailed material should live in dedicated documentation where appropriate, including:
HTTP transport behavior
Retry policy
Timeout behavior
Session/client ownership
Exception reference
Compatibility mode
Public API contract
Cancellation behavior
Concurrent request behavior
Advanced usage
Migration/release-specific information
The goal is not to remove useful documentation, but to make the README easier to approach.
Testing requirements
The existing synchronous test suite must remain green throughout development.
Async support should gain deterministic offline tests covering at minimum:
README and async documentation must describe the final implementation accurately.
Relevant live MLB API smoke tests must pass.
Non-goals
Version 1.1.0 should not:
Replace the synchronous client
Make Mlb conditionally async
Return coroutines from existing synchronous methods
Rewrite the entire library architecture solely for async support
Maintain a separate async package/project
Change the established 1.0 HTTP contract without a separate justified proposal
Promise full async endpoint parity before it has actually been implemented and tested
Add hidden request fan-out, background workers, or automatic batching as part of normal endpoint behavior
Promise cross-thread or cross-event-loop client use
Definition of done
Version 1.1.0 is ready when the library has a documented, tested, maintainable async client architecture; existing synchronous users can upgrade without code changes; the initial supported async endpoint set is clearly documented; package installation and release validation cover both modes; the #298 contract is enforced by deterministic tests and downstream acceptance criteria; and the README has been streamlined for new users.
v1.1.0: Add first-class async client support and streamline documentation
Goal
Version 1.1.0 will add first-class asynchronous support to
python-mlb-statsapiwhile preserving the existing synchronousMlbAPI and the stable 1.x behavioral contract introduced in version 1.0.0.The async implementation should reuse the existing models, exceptions, endpoint semantics, and response parsing wherever practical rather than creating a separate project or independently maintained implementation.
Version 1.1.0 will also streamline the README so new users can understand and start using the library without working through detailed transport and API documentation first.
Core design
The package should expose two explicit clients:
Synchronous usage remains unchanged:
Async usage should follow normal Python async conventions:
Mlbmust never return coroutines or change behavior based on configuration. Sync and async APIs remain separate and explicit.Compatibility requirement
Upgrading from 1.0.x to 1.1.0 must require zero code changes for existing synchronous users.
The following existing behavior must remain stable:
MlbMlbDataAdapterstrict_http=Truedefault behaviorstrict_http=Falsecompatibility modeAsync support is additive.
Async behavior
The async implementation should provide equivalents for the important existing transport guarantees.
AsyncMlbandAsyncMlbDataAdaptershould define and test:async withlifecycle behavioraclose()behaviorWhere possible, sync and async clients should produce the same models and public exceptions for equivalent responses.
Completed async contract
Issue #298 is the source of truth for the v1.1 async public and behavioral contract.
The downstream implementation issues must enforce the relevant parts of #298 rather than treating it as background documentation:
AsyncMlblifecycle and initial endpoint sliceA downstream implementation issue is not complete if its relevant #298 contract obligations are unimplemented or untested, even if the basic feature appears to work.
Architecture
Avoid maintaining two independent copies of endpoint parsing and model-construction logic.
The preferred direction is:
Shared code should be extracted incrementally.
Do not perform a large rewrite of the existing synchronous client solely to support async.
Initial async scope
Start with a small vertical slice rather than immediately porting every public endpoint.
The first implementation should prove:
The initial endpoint set defined in #298 is:
get_teamget_personget_scheduleOnce the architecture is validated, async endpoint coverage can expand systematically.
Full endpoint parity is not required before the architecture itself has been proven.
Packaging
Async dependencies should preferably be optional so existing users do not receive additional HTTP dependencies simply by upgrading.
Desired installation model:
for the synchronous client, and something similar to:
pip install "python-mlb-statsapi[async]"for async support.
The exact async transport library should be selected as part of #300 according to the requirements established in #298 rather than assumed by this parent issue.
Documentation and README cleanup
The current README contains increasingly detailed HTTP, transport, migration, and API information.
Version 1.1.0 should simplify it around the information most users need first:
More detailed material should live in dedicated documentation where appropriate, including:
The goal is not to remove useful documentation, but to make the README easier to approach.
Testing requirements
The existing synchronous test suite must remain green throughout development.
Async support should gain deterministic offline tests covering at minimum:
#302 is responsible for executable transport-contract coverage. #304 is responsible for sync/async parity coverage.
Live MLB API testing should remain separate from deterministic CI tests.
Release validation
Before version 1.1.0 is released:
Non-goals
Version 1.1.0 should not:
Mlbconditionally asyncDefinition of done
Version 1.1.0 is ready when the library has a documented, tested, maintainable async client architecture; existing synchronous users can upgrade without code changes; the initial supported async endpoint set is clearly documented; package installation and release validation cover both modes; the #298 contract is enforced by deterministic tests and downstream acceptance criteria; and the README has been streamlined for new users.
Implementation issues
Suggested implementation order
#306 README/documentation cleanup should begin after the public async shape is proven in #303 and can proceed alongside parity/coverage work.
#307 release preparation and validation is last.