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: Union[bool, NoneType] = 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.Union[bool, NoneType], defaultNoneSet to True to disable progress bar display entirely, None to disable on non-TTY, or False to always enable
 
Returns¶
- 
typing.Union[ForwardRef('pandas.DataFrame'), dict]Query result
 
run¶
run(self) -> None
Set this query running in FlowKit
wait_until_ready¶
wait_until_ready(self, poll_interval: int = 1, disable_progress: Union[bool, NoneType] = 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.Union[bool, NoneType], 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"