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.2.tar.gz (93.3 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.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qgis_bridge-0.1.2.tar.gz
  • Upload date:
  • Size: 93.3 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.2.tar.gz
Algorithm Hash digest
SHA256 44195fef375d96680fcc140758ddfe9299530dc203f788c3b886b5a3821c6a1e
MD5 cd12c9a6b849cd739c0307f6659318db
BLAKE2b-256 ad9d006da109fd668bfafb055ca95eccaa800bbb61c9c79c8a622996843f6d59

See more details on using hashes here.

Provenance

The following attestation bundles were made for qgis_bridge-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: qgis_bridge-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc3975acd291e16a134254009f5f7f59b177e614b37e387df36beb021041ae2
MD5 5d546f8a7f99cffe34ecd2ce6f14bfa9
BLAKE2b-256 cc43675390bb1a8e979540200e0124f5f4173d7bb5b36988dfbc85a3c7c740e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qgis_bridge-0.1.2-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