Skip to content

Async Core API: Daily Extract & Files #124

@btoron

Description

@btoron

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.py for all responses
  • Saved responses captured in tests/saved_responses/daily_extracts/
  • Live tests with @pytest.mark.uses_real_data marker
  • 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 methods
  • ofsc/models.py - Daily extract models
  • tests/async/test_async_daily_extract.py - Test file
  • tests/saved_responses/daily_extracts/ - API response files

Metadata

Metadata

Assignees

No one assigned

    Labels

    asyncAsync client implementationcoreCore API moduleenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions