Skip to main content

Push spatial data from Python directly into a live QGIS session

Project description

qgis-bridge

Push spatial data from Python directly into a live QGIS session — no file exports, no manual imports, no QGIS-specific knowledge required.

Overview

qgis-bridge eliminates the friction of moving data between Python analysis environments and QGIS for visualization. Run your spatial analysis in a Jupyter notebook or Python script, then send results to QGIS with a single function call.

Usage

Standalone function:

from qgis_bridge import to_qgis

to_qgis(gdf, layer_name="Risk Zones", color_by="risk_score")

GeoDataFrame accessor:

import qgis_bridge  # registers the .qgis accessor on GeoDataFrame

gdf.qgis.send(layer_name="Risk Zones", color_by="risk_score")

Cloud raster URIs (streamed directly, no local download):

to_qgis("gs://my-bucket/elevation.tif", layer_name="Elevation")
to_qgis("s3://my-bucket/imagery.tif", layer_name="Imagery")
to_qgis("az://my-container/dem.tif", layer_name="DEM")

Supported Data Types

  • Vector: GeoDataFrame with a CRS set
  • Raster: Cloud GeoTIFFs via GCS (gs://), S3 (s3://), or Azure Blob (az://)

Design

  • Zero QGIS installation required in the Python environment
  • Communicates with an already-running QGIS instance
  • No authentication surface — credential resolution handled by QGIS/GDAL
  • Works in Jupyter, JupyterLab, VS Code, and plain Python scripts

Installation

pip install qgis-bridge

The QGIS plugin must also be installed separately inside QGIS (Plugins > Install from Zip), using the qgis_plugin/ directory from this repository.

Contributing

This project uses uv for development.

# Install uv (if not already installed)
brew install uv          # macOS
pip install uv           # any platform

# Clone and set up
git clone https://github.com/R-Repo/qgis-bridge
cd qgis-bridge
uv sync --group dev      # creates .venv and installs all dependencies

# Run tests (no QGIS required)
uv run pytest tests/

Status

Early development. API subject to change.

License

MIT

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

qgis_bridge-0.1.0.tar.gz (93.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qgis_bridge-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file qgis_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: qgis_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 93.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qgis_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45df323d3109d33f7dcc2381325fb759bfbb804194093074f642f683c9e3bd39
MD5 6f0f8a4a09e9fd06457979559d741b82
BLAKE2b-256 3144db041131f895371f878bcbbba48ef416f42f577a958d8ac66ec8077da6c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for qgis_bridge-0.1.0.tar.gz:

Publisher: publish.yml on R-Repo/qgis-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qgis_bridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qgis_bridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qgis_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e63eabf6294108de3f29ca9d5ac0b53c8c22a3259d7cfdf5a17fee899b86467
MD5 7a601dae6a005b367bea4a4fd3697bb9
BLAKE2b-256 7a07a67f4e2bcb0650ff63b19455cfa31f64d8907adf3fc2e3eb0d516960f5e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for qgis_bridge-0.1.0-py3-none-any.whl:

Publisher: publish.yml on R-Repo/qgis-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page