DataCollection into a ParallelDataCollection,
splitting a single HTTP request into many parallel requests for faster
data export.
By default the request is split on the primary query parameter (for example,
get_asset_metrics(assets=...) is split into one request per asset).
- Parameters:
- parallelize_on (Optional *[*Union [str , List [str ] ] ]) — Parameter(s) to parallelize on. Must be one of the
list-type parameters of the underlying endpoint
(
assets,markets,metrics, …). - executor (Optional *[*Callable [ *[*Any ] , concurrent.futures.Executor ] ]) — Executor class used for concurrency. Defaults to
concurrent.futures.ThreadPoolExecutor; pass aProcessPoolExecutor(or any otherExecutorsubclass) to swap it out. - max_workers (Optional [int ]) — Number of parallel workers. Defaults to
10and is capped at10to respect API rate limits. - progress_bar (Optional [bool ]) — Whether to display a
tqdmprogress bar while the workers run. Defaults toTrue. - time_increment (Optional *[*Union *[*relativedelta , timedelta , DateOffset ] ]) — Optionally split the request along the time axis as
well. Use
datetime.timedeltafor sub-month windows anddateutil.relativedelta.relativedeltafor month / year windows. Requiresstart_timeto be set on the original request. - height_increment (Optional [int ]) — Optionally split the request along the block-height
axis. Requires
start_heightto be set on the original request.
- parallelize_on (Optional *[*Union [str , List [str ] ] ]) — Parameter(s) to parallelize on. Must be one of the
list-type parameters of the underlying endpoint
(
- Returns:
A
ParallelDataCollectionthat mirrors the original request but executes its workload across multiple workers.

