Skip to content

Conversation

@1yam
Copy link
Member

@1yam 1yam commented Jan 21, 2026

This pull request adds support for querying address statistics from the Aleph node API, including filtering and sorting capabilities. It introduces new models and filters for handling address stats, updates the HTTP client to support these queries, and adds comprehensive unit tests for the new functionality.

Address stats query feature:

  • Added a new AddressesFilter class to src/aleph/sdk/query/filters.py for filtering and sorting address stats queries, including options for substring filtering and sorting by message type and order.
  • Introduced the SortByMessageType enum to specify supported sort fields in address stats queries.
  • Implemented the AddressStats and AddressStatsResponse models in src/aleph/sdk/query/responses.py to represent address statistics and the paginated response structure.
  • Updated the HTTP client in src/aleph/sdk/client/http.py to add the get_address_stats method, allowing asynchronous retrieval of address statistics with filtering and pagination support. [1] [2]

Testing and validation:

  • Added unit tests in tests/unit/test_asynchronous_get.py to verify the new address stats query functionality, including tests for filtered and unfiltered queries, and introduced fixtures in tests/unit/conftest.py to provide mock address stats data and responses. [1] [2] [3]

@1yam 1yam requested review from aliel, nesitor and odesenfans January 21, 2026 10:35
@aleph-im aleph-im deleted a comment from github-actions bot Jan 21, 2026
@1yam 1yam changed the title Feature: new method in AlephHttpClient get_address_stats Feature: Implement missing PyAleph API endpoints Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants