Feature: Implement missing PyAleph API endpoints #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
AddressesFilterclass tosrc/aleph/sdk/query/filters.pyfor filtering and sorting address stats queries, including options for substring filtering and sorting by message type and order.SortByMessageTypeenum to specify supported sort fields in address stats queries.AddressStatsandAddressStatsResponsemodels insrc/aleph/sdk/query/responses.pyto represent address statistics and the paginated response structure.src/aleph/sdk/client/http.pyto add theget_address_statsmethod, allowing asynchronous retrieval of address statistics with filtering and pagination support. [1] [2]Testing and validation:
tests/unit/test_asynchronous_get.pyto verify the new address stats query functionality, including tests for filtered and unfiltered queries, and introduced fixtures intests/unit/conftest.pyto provide mock address stats data and responses. [1] [2] [3]