Skip to main content

geojibe

Official Python SDK and CLI for the GeoJibe geospatial processing platform and API.

geojibe is an HTTPS client for an existing GeoJibe installation. Processing stays on the server. It does not require Docker, GDAL, DuckDB, QGIS, Go, or a local GeoJibe server.

Fuller product documentation: GeoJibe Guides, including the command-line client.

Install

This package is not published on PyPI yet. After the first public release, the intended command will be:

pip install geojibe

Until then, from a source checkout, Python 3.10 or newer:

cd clients/python
python -m pip install -e .

That provides the geojibe executable and the geojibe Python package.

Authenticate

Create a Personal Access Token in GeoJibe → Account → API Tokens, then:

geojibe auth login

Enter the GeoJibe URL (your installation origin, for example https://geojibe.example.com — not an /api/v1 path) and the token. Token input is hidden. On success: Authenticated successfully.

Use

geojibe jobs list
geojibe sources list
geojibe destinations list
geojibe recipes list
geojibe jobs run <id>
geojibe workspace upload roads.gpkg
geojibe transformations list

--json writes machine-readable JSON to stdout:

geojibe jobs list --json
ID=$(geojibe workspace upload roads.gpkg --json | jq -r '.id')

Automation

export GEOJIBE_URL=https://geojibe.example.com
export GEOJIBE_TOKEN=gjp_...

geojibe jobs list --json

Do not hard-code a hosted GeoJibe URL. Shared, Dedicated, and On-Site installations each have their own origin.

Credential precedence, highest wins:

  1. --url / --token
  2. GEOJIBE_URL / GEOJIBE_TOKEN
  3. Saved configuration

Configuration

geojibe config set-url and geojibe config set-token write a user-level file, never the current working directory:

OS Path
Linux ~/.config/geojibe/config.toml ($XDG_CONFIG_HOME if set)
macOS ~/Library/Application Support/geojibe/config.toml
Windows %APPDATA%\geojibe\config.toml

That file may contain a Personal Access Token. Permissions are set to 0600 on Unix. geojibe config show prints a masked token only.

Logout removes the local token. It does not revoke the PAT. Revoke tokens in Account → API Tokens.

geojibe auth status
geojibe auth logout

Commands

geojibe --help
geojibe --version

geojibe auth …
geojibe config …
geojibe sources list|get|create|delete
geojibe destinations list|get|create|delete
geojibe jobs list|get|run|enable|disable|delete|create|update|runs|retry
geojibe recipes list|get|create|delete
geojibe workspace upload|info|preview|convert|download
geojibe workspace transform get|set|clear|preview
geojibe transformations list|show

Workspace processing is remote. Discover operations with geojibe transformations list and geojibe transformations show <id>.

geojibe workspace transform set <id> --file pipeline.json
{
  "layers": ["apiary"],
  "operations": [
    {"type": "buffer", "distance": 10, "units": "source"}
  ]
}

--debug prints HTTP method, URL, and status to stderr (never the token). --insecure disables TLS verification for development certificates only and is not saved. TLS verification is on by default.

geojibe jobs create --file job.json sends the public API body (POST /api/v1/jobs) unchanged.

{
  "name": "Neighborhoods",
  "source_id": "…",
  "transform_mode": "sql",
  "sql": "SELECT * FROM source WHERE population > 1000",
  "output_format": "GeoJSON",
  "destination_id": "…",
  "destination_target": {"schema": "public", "table": "neighborhoods", "write_mode": "replace"},
  "schedule": {"kind": "daily", "timezone": "UTC", "hour": 2, "minute": 0}
}

Python

from geojibe import GeoJibe, ValidationError

client = GeoJibe(
    url="https://geojibe.example.com",
    token="gjp_...",
)

url and token may also come from GEOJIBE_URL and GEOJIBE_TOKEN when omitted. Explicit constructor arguments always win. The token is sent as Authorization: Bearer and is never logged, stored, or included in exceptions.

client.me()

Upload

ws = client.workspaces.upload("roads.gpkg")
print(ws.id, ws.status, ws.layers)

Preview

rows = ws.preview_data("roads", limit=50)
geojson = ws.preview_map("roads")["geojson"]

preview_data and preview_map return the server JSON, including fields, counts, truncation, and CRS. preview_map()["geojson"] is a GeoJSON FeatureCollection. Visualization is up to the caller.

Transform

Discover operations from the server (do not hard-code a catalog):

ops = client.transformations.list()
ws.set_transformations(
    layers=["roads"],
    operations=[{"type": "buffer", "distance": 10, "units": "source"}],
)

SQL and Python are sibling fields, not operation types:

ws.set_transformations(layers=["roads"], sql="SELECT * FROM source")
ws.set_transformations(python={"script": script, "filename": "script.py"})
ws.clear_transformations()

Transformed preview

Uses the stored pipeline. The SDK does not resend or execute it locally.

ws.preview_transformed_data("roads", limit=50)
ws.preview_transformed_map("roads")

Convert and download

ws.convert(output_format="GeoJSON", layers=["roads"])
output = ws.download("roads.geojson")

Download streams to disk. An existing file is not overwritten unless you pass overwrite=True. Convert is currently synchronous (status=completed).

Saved Sources, Destinations, Recipes, and Jobs keep their existing methods:

jobs = client.jobs.list()
client.jobs.run(jobs[0]["id"])

Errors

try:
    ws.preview_transformed_map("other_layer")
except ValidationError as exc:
    print(exc.status_code, exc.code, exc.message, exc.details)

timeout (default 30s) is the ordinary HTTP timeout. run_timeout (default 600s) is used for upload, preview, convert, and download.

Exit codes

Code Meaning
0 Success
1 Failure (including a finished Run with status failed)
2 Usage / local config
3 Authentication (401 / missing credentials)
4 Authorization (403 / missing PAT scope)
5 Not found (404)
6 Validation (400 / 409 / 422)
7 Network (DNS, connection refused, TLS, timeout)
8 GeoJibe server error (5xx)

Security

  • PAT is sent as Authorization: Bearer, never as a query parameter
  • Full PAT is not printed by config show, auth status, or default errors
  • Source and Destination secrets from the API are not displayed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geojibe-0.1.0.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

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

geojibe-0.1.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geojibe-0.1.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for geojibe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4986abeaa1b8d504c3e6fabf20b516811a423930d3eaba5cda718c5eb63ab921
MD5 3974f61a21d5d7c6a94471c351967211
BLAKE2b-256 d98cce50848153e7afd83b3950fa8ce14065a0bc8650c55154725ad88190aa24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geojibe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for geojibe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdaac15954cd6fb50a65dd23c7af0f83e4464d086491477b653cb654b159b6a
MD5 5925a612bbe26cdc93c9500caea36e55
BLAKE2b-256 f4d807801ff99e7d6f97f22495a20e5b33683451162fb0ff3d8c85e7205645f2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 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