Rapidata order
RapidataOrder #
An instance of a Rapidata order.
Used to interact with a specific order in the Rapidata system, such as starting, pausing, and retrieving results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the order. |
required |
order_id
|
str
|
The ID of the order. |
required |
openapi_service
|
OpenAPIService
|
The OpenAPIService instance for API interaction. |
required |
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
run #
run(
after: RapidataOrder | str | None = None,
) -> RapidataOrder
Runs the order to start collecting responses. Args: after: The order to set as the preceding order. So order will only start collecting responses after the preceding order is completed. Can be a RapidataOrder instance, a string order ID, or None. If None, the order will start collecting responses immediately. Returns: The order itself.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
pause #
Pauses the order.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
unpause #
Unpauses/resumes the order.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
delete #
Deletes the order.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
get_status #
Gets the status of the order.
States
Created: The order has been created but not started yet.
Preview: The order has been set up and ready but not collecting responses yet.
Submitted: The order has been submitted and is being reviewed.
ManualReview: The order is in manual review - something went wrong with the automatic approval.
Processing: The order is actively being processed.
Paused: The order has been paused.
Completed: The order has been completed.
Failed: The order has failed.
StaleResults: The order completed but its result file is no longer valid; calling get_results regenerates it automatically.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
display_progress_bar #
Displays a progress bar for the order processing using tqdm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refresh_rate
|
int
|
How often to refresh the progress bar, in seconds. |
5
|
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
get_results #
get_results(
preliminary_results: bool = False,
) -> RapidataResults
Gets the results of the order. If the order is still processing, this method will block until the order is completed and then return the results. If the order's results have gone stale, regeneration is triggered automatically and this method blocks until the fresh results are ready.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preliminary_results
|
bool
|
If True, returns the preliminary results of the order. Defaults to False. Note that preliminary results are not final and may not contain all the datapoints & responses. Only the ones that are already available. |
False
|
Info
Currently the SDK does not support streaming. The preliminary results are simply a snapshot of the results at the time of the request.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
view #
Opens the order details page in the browser.
Source code in src/rapidata/rapidata_client/order/rapidata_order.py
preview #
Opens a preview of the order in the browser.