flowclient.api_query¶
Class APIQuery¶
APIQuery(*, connection: flowclient.connection.Connection, parameters: dict)
Representation of a FlowKit query.
Methods¶
get_result¶
get_result(self, format: str = 'pandas', poll_interval: int = 1, disable_progress: Optional[bool] = None) -> Union[ForwardRef('pandas.DataFrame'), dict]
Get the result of this query, as a pandas DataFrame or GeoJSON dict.
Parameters¶
-
format:str, defaultpandasResult format. One of {'pandas', 'geojson'}
-
poll_interval:int, default1Number of seconds to wait between checks for the query being ready
-
disable_progress:typing.Optional, defaultNoneSet to True to disable progress bar display entirely, None to disable on non-TTY, or False to always enable
Returns¶
-
typing.UnionQuery result
run¶
run(self) -> None
Set this query running in FlowKit
wait_until_ready¶
wait_until_ready(self, poll_interval: int = 1, disable_progress: Optional[bool] = None) -> None
Wait until this query has finished running.
Parameters¶
-
poll_interval:int, default1Number of seconds to wait between checks for the query being ready
-
disable_progress:typing.Optional, defaultNoneSet to True to disable progress bar display entirely, None to disable on non-TTY, or False to always enable
connection¶
connection
Connection that is used for running this query.
Returns¶
-
flowclient.connection.ConnectionConnection to FlowKit API
status¶
status
Status of this query.
Returns¶
-
strOne of: - "not_running" - "queued" - "executing" - "completed"