Skip to content

Conversation

@Pijukatel
Copy link
Contributor

@Pijukatel Pijukatel commented Dec 11, 2025

Description

  • All collection clients list method returns an iterator as well.
  • All async collection clients list method returns an async iterator as well.
  • List of modified clients (same for async clients):
    • ActorCollectionClient
    • BuildCollectionClient
    • RunCollectionClient
    • ScheduleCollectionClient
    • TaskCollectionClient
    • WebhookCollectionClient
    • WebhookDispatchCollectionClient
    • DatasetCollectionClient
    • KeyValueStoreCollectionClient
    • RequestQueueCollectionClient
    • StoreCollectionClient
    • ActorEnvVarCollectionClient
    • ActorVersionCollectionClient

TODO:

  • Pick proper names for the new method and interface
  • Update docs

Example usage

...
# Sync
datasets_client = ApifyClient(token='...').datasets()

# Same as before
list_page = datasets_client.list(...)

# New functionality
individual_items = [item for item in datasets_client.list(...)]

...
# Async
datasets_client = ApifyClientAsync(token='...').datasets()

# Same as before
list_page = await datasets_client.list(...)

# New functionality
individual_items = [item async for item in datasets_client.list(...)]

Issues

Testing

  • Unit tests
  • Manual API tests

Checklist

  • CI passed

@github-actions github-actions bot added this to the 129th sprint - Tooling team milestone Dec 11, 2025
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Dec 11, 2025
@Pijukatel Pijukatel force-pushed the iterable-list-methods branch from 9e6bb90 to fdf4b3d Compare December 11, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants