quantlab.acquisition.symbol_batch.AcquisitionResult#

class quantlab.acquisition.symbol_batch.AcquisitionResult(vendor, requested, succeeded, failures, cancelled, quota_aborted, coverage)[source]#

Bases: object

Outcome of one download or refresh call, kept in memory.

The result lets an in-process caller learn what a run did without reading anything back from disk. It answers a narrower question than the failure manifest (the JSON file listing every symbol known to be failing). failures holds only the symbols this run attempted and could not fetch, while the manifest also keeps entries left by earlier runs. So set(failures) is a subset of both requested and the manifest’s keys, and the messages agree on every shared key. Failure messages have already had credential values removed; do not add a second path that carries raw vendor exception text.

The class lives here rather than beside the vendor registry because this root module must not import a module that constructs vendor clients (the registry imports every vendor).

Attributes:
vendorstr

The vendor token the run fetched from.

requestedtuple[str, …]

Every symbol the run was asked for, after validation.

succeededtuple[str, …]

Symbols whose batches completed, sorted.

failuresdict[str, str]

{symbol: scrubbed message} for this run’s failures.

cancelledbool

Whether the caller’s cancel token stopped the run.

quota_abortedbool

Whether the vendor’s request quota ran out.

coveragedict

coverage_report() computed after the run.

Examples

Read the result of a run off the acquisition object:

result = acq.download().last_result
if result.failures:
    print("failed:", sorted(result.failures))
if result.quota_aborted:
    print("quota ran out; re-run later to resume")