-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
asyncAsync client implementationAsync client implementationcoreCore API moduleCore API moduleenhancementNew feature or requestNew feature or request
Description
User Story
As a developer using pyOFSC in async applications
I want async versions of daily extract file operations
So that I can retrieve daily extract data without blocking in async/await contexts
Description
Implement async versions of all daily extract file operations in AsyncOFSCore.
Methods to Implement (3 total)
-
get_daily_extract_dates()- GET/rest/ofscCore/v1/folders/dailyExtract/folders/- Get list of available daily extract dates (folders)
-
get_daily_extract_files(date)- GET/rest/ofscCore/v1/folders/dailyExtract/folders/{date}/- Get list of files available for a specific date
-
get_daily_extract_file(date, filename)- GET/rest/ofscCore/v1/folders/dailyExtract/folders/{date}/{filename}- Download a specific daily extract file (returns bytes)
Acceptance Criteria
- All methods use Pydantic models only (no raw dict responses)
- Models exist/created in
ofsc/models.pyfor all responses - Saved responses captured in
tests/saved_responses/daily_extracts/ - Live tests with
@pytest.mark.uses_real_datamarker - Methods follow async pattern (httpx, error handling)
- All tests passing
Technical Design
File: ofsc/async_client/core.py
Pattern: Follow async metadata implementation pattern
Note: get_daily_extract_file returns bytes for file content, which is appropriate for file download operations.
Related Files
ofsc/async_client/core.py- Implement async methodsofsc/models.py- Daily extract modelstests/async/test_async_daily_extract.py- Test filetests/saved_responses/daily_extracts/- API response files
Metadata
Metadata
Assignees
Labels
asyncAsync client implementationAsync client implementationcoreCore API moduleCore API moduleenhancementNew feature or requestNew feature or request