Skip to content

CLI

geobatch

CLI for the Geoapify REST API.

Set your GEOAPIFY_KEY environment variable or provide the API key using the --api-key option.

Usage:

geobatch [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

receive

Monitor jobs and store results.

Specifications of file path_data_in - JSON dictionary with the following attributes.

Mandatory: - result_urls: list of URLs referencing the batch jobs running on the Geoapify servers. - sleep_time: int, sleep time in seconds between every GET call of a single job to check the status.

Optional: - id: str, any name for reference. This will be stored as the data_input_id in the outputs.

Arguments: path_data_in: path to the JSON file read as input. path_data_out: destination of the JSON output file. api_key: if not set, will be read from the GEOAPIFY_KEY environment variable.

Usage:

geobatch receive [OPTIONS] PATH_DATA_IN PATH_DATA_OUT

Options:

  -k, --api-key TEXT
  --help              Show this message and exit.

submit

Post batch jobs and store result urls.

Specifications of file path_data_in - JSON dictionary with the following attributes.

Mandatory: - api: string, the name of the Geoapify API. E.g., '/v1/geocode/search'. - inputs: list of locations in any of the supported formats. See geoapify.batch.BatchClient.

Optional: - params: dict of optional parameters valid for all locations. See the Geoapify API docs. - batch_len: int, maximal size of a single batch. Data will be distributed across multiple jobs if needed. - id: str, any name for reference. This will be stored as the data_input_id in the outputs.

Arguments: path_data_in: path to the JSON file read as input. path_data_out: destination of the JSON output file. api_key: if not set, will be read from the GEOAPIFY_KEY environment variable.

Usage:

geobatch submit [OPTIONS] PATH_DATA_IN PATH_DATA_OUT

Options:

  -k, --api-key TEXT
  --help              Show this message and exit.

version

Print package version.

Usage:

geobatch version [OPTIONS]

Options:

  --help  Show this message and exit.