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 the package folder during development:
cd D:\GAS\packages\gas-client
python -m pip install -e .
After publication:
python -m pip install gas-client
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
request_body = client.build_execute_task_request(
"Create an interactive web map.",
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("interactive_mapping_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)
Publishing Checklist
Before publishing publicly:
- Confirm the final package name on PyPI.
- Update
versioninpyproject.toml. - Sync the package copy from the repository root if
D:\GAS\gas_clientchanged. - Run client tests from the repository root.
- Build and inspect the package.
cd D:\GAS
.\packages\gas-client\sync_from_repo.ps1
.\.venv\Scripts\python.exe -m pytest tests\test_gas_client.py
cd D:\GAS\packages\gas-client
python -m build
python -m twine check dist/*
Upload only when ready:
python -m twine upload dist/*
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.0.tar.gz.
File metadata
- Download URL: gas_client-0.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b96829548cc516d6ae072d1b202119367299ebe9be3009af169f5525d5956713
|
|
| MD5 |
87796500e3dbeb6baf4ce481101bf5fc
|
|
| BLAKE2b-256 |
986280febfab1b3c59c3f2620ebcf567aabb0c7e01325d91b78d3d57450dd30f
|
File details
Details for the file gas_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gas_client-0.1.0-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 |
e777da29873b0da59cacafa769eff22314801510882b4086e136b0717b1d7a7c
|
|
| MD5 |
3dd50587780a7cb483b396b8416de3fb
|
|
| BLAKE2b-256 |
40bb5c690b467eb920f2c04f365a9628b47680911acbea952cef20e64409a92e
|