Skip to main content

PyGeoModel

PyGeoModel is a Python package for integrating OpenGMS geographic model services into Python-based urban data science workflows. It provides programmatic access to model-service discovery, metadata inspection, service invocation, and result management. For exploratory notebook-based analysis, PyGeoModel also provides an optional Jupyter interface built on the same core API.

Installation

pip install PyGeoModel

Use the package in Python with:

from pygeomodel import GeoModeler

Core API

from pygeomodel import GeoModeler

modeler = GeoModeler()

models = modeler.search_models("photovoltaic")
model = modeler.get_model("Roof Photovoltaic Carbon Emission Reduction Potential Assessment Model")

print(model.description)
print(model.inputs)
print(model.outputs)

Model services can be invoked programmatically:

result = modeler.invoke(
    "Roof Photovoltaic Carbon Emission Reduction Potential Assessment Model",
    params={
        "system_efficiency": 0.8,
        "start_time": "2018-01",
        "end_time": "2018-12",
        "roof_vector_path": "data/rooftops.zip",
    },
)

saved_files = result.save(output_dir="data/result/live_run")

The model configuration is recorded directly in the Python cell through the explicit params dictionary, while TaskResult.save() stores the downloadable model outputs for subsequent analysis.

Notebook Interface

modeler.show_models()
modeler.invoke_model("Roof Photovoltaic Carbon Emission Reduction Potential Assessment Model")

The notebook interface renders model search, metadata inspection, parameter entry, task execution, and output display. It uses the same search_models(), get_model(), and invoke() functions as the programmatic API so GUI operations can be converted into explicit Python parameters and saved model outputs when needed.

Recommendation and Q&A

recommendation = modeler.suggest_model()

answer = modeler.ask_model(
    "Roof Photovoltaic Carbon Emission Reduction Potential Assessment Model",
    "What input data are required?",
)

The recommendation service automatically builds notebook/data context and calls the configured recommendation workflow. Q&A uses OpenGMS model metadata and an OpenAI-compatible web-enabled model. The main notebook workflow is designed to run out of the box for demonstration use.

Relation to OpenGMS

OpenGMS provides the model-service platform and online execution infrastructure. PyGeoModel is a Python client package that exposes OpenGMS model-service discovery, metadata inspection, task invocation, and result management to Python and notebook workflows.

Metadata

Release files for PyGeoModel 1.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyGeoModel 1.0.16
File Size Uploaded
pygeomodel-1.0.16.tar.gz 4.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyGeoModel 1.0.16
File Interpreter ABI Platform
pygeomodel-1.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 MB

Release files / pygeomodel-1.0.16.tar.gz

Download URL pygeomodel-1.0.16.tar.gz
Size 4.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2c49c49deb3ece8f910dde7c5a697faadf89172cb9714623f806ccafe4411499
BLAKE2b-256 checksum
How to use checksums
ea0ea84ed969e87491f09c5d5acf0bd4a7c46d76ab26ab9939a1dbad6f8f6ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / pygeomodel-1.0.16-py3-none-any.whl

Download URL pygeomodel-1.0.16-py3-none-any.whl
Size 4.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6c084ce996183d879f4a45cbaff50b1c9c48f0fcee5cd1497ed7f6ab8054bc51
BLAKE2b-256 checksum
How to use checksums
b5980c963860effeb19d72fda08a64b86544f26e2328b2b8b82d119cc8ffaea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

1.0.16 This release

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page