Python SDK for Geospatial Agentic Services (GAS).
Project description
GAS Client
Python SDK for Geospatial Agentic Services (GAS).
This package contains only the lightweight client layer. It does not install the GAS server, Flask, GeoPandas, Rasterio, PySAL, or other geospatial runtime dependencies.
Install
Install from PyPI:
python -m pip install gas-client
For local development from this repository:
cd packages/gas-client
python -m pip install -e .
Quick Start
from gas_client import GasClient
client = GasClient(
"https://your-gas-server.com",
openai_api_key="YOUR_OPENAI_API_KEY",
)
print(client.list_agents())
agent = client.agent("geospatial_data_retrieval_agent")
result = agent.execute_task(
"Download Pennsylvania county boundaries from Census Bureau.",
mode="sync",
)
client.print_task_summary(result)
Streaming Tasks
for event in agent.execute_task(
"Download Pennsylvania county boundaries from Census Bureau.",
mode="stream",
):
client.print_stream_event(event)
if event.get("event") == "task_result":
result = event.get("payload")
client.print_task_summary(result)
Canonical GAS Request Body
Credential requirements are defined by each service's DescribeAgent
capability document. Inspect the selected agent before submitting a task: one
service may require an OpenAI key, another may use a different model provider,
another may require data-source credentials, and deterministic services may not
need an LLM key.
request_body = client.build_execute_task_request(
"Create a web mapping app.",
mode="stream",
input_datasets=[
"https://example.com/counties.geojson",
],
artifact_delivery="URL",
credentials={
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
},
)
for event in client.agent("web_mapping_app_agent").execute_task_request(request_body):
client.print_stream_event(event)
Public API
from gas_client import (
GASClient,
GasAgentClient,
GasClient,
GasClientError,
GasTaskTimeoutError,
)
Important methods:
get_capabilities()list_agents()describe_agent(agent_id)agent(agent_id)execute_task(agent_id, instructions, mode="sync")execute_task_request(agent_id, request_body)get_task_status(agent_id, task_id)get_task_result(agent_id, task_id)wait_for_task(agent_id, task_id)cancel_task(agent_id, task_id)encode_dataset_file(path)print_stream_event(event)print_task_summary(result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gas_client-0.1.1.tar.gz.
File metadata
- Download URL: gas_client-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cf6ae20977cbf323746cca7b1a390e7ac02dfa41d935a7591e93e4b6db44327
|
|
| MD5 |
12fd87f3d960c99892b51c6df11f043d
|
|
| BLAKE2b-256 |
f3b55eb0a5bfff359850118a7931b5b4182a4fca07ac016545300668670d2a06
|
File details
Details for the file gas_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gas_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071a90bcadd01801ecbd59e069c2c18b236f44a449bda693b1778c8dcefbaced
|
|
| MD5 |
ccc8f0d531dc3bcc35db5af79529a932
|
|
| BLAKE2b-256 |
f4c4e48dd2e578ddca74e699813603b378b90fb7202e004a3d39a55f2de4ff1f
|