Skip to main content

Terrakio API Client

A Python client for Terrakio API. This package provides a user-friendly interface for accessing Terrakio's data services.

Features

  • Authentication
  • WCS queries and data retrieval
  • Mass stats related functionalities

Installation

pip install terrakio-api

Usage Example

from terrakio_api import Client
from shapely.geometry import Point

# Initialize the client
client = Client()  # defaults to https://dev-omni.terrak.io (fronts all regions)
# or name an environment: Client(env="prod" | "candidate" | "dev-au" | "local" | …),
# settable for a whole session with TERRAKIO_ENV

# Login to your account
client.auth.login(email = "XXX", password = "XXX")
print("✓ Login successful")

# The login account will automatically be used for the requests

# View API key
api_key = client.auth.view_api_key()
print(f"✓ Current API key: {api_key[:10]}...")

# Create an extra API key (the full key is returned only here, so store it now)
new_key = client.keys.create_key(label="my laptop")
print(f"✓ New API key: {new_key['key']}")

# List your keys (metadata only) and revoke one
for key in client.keys.list_keys():
    print(key["id"], key["prefix"], key["label"])
client.keys.revoke_key(key_id=new_key["id"])

# To rotate a key: create a new one, switch your code over to it, then revoke the old one.

# Create a geographic feature
point = Point(149.057, -35.1548)

# Make a WCS request
dataset = client.geoquery(
     expr="prec=MSWX.precipitation@(year=2024, month=1)\nprec",
     feature=point,
     output="netcdf"
)

For more documentation, see the main repository.

Download files

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

Source Distribution

terrakio_api-0.9.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

terrakio_api-0.9.3-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file terrakio_api-0.9.3.tar.gz.

File metadata

  • Download URL: terrakio_api-0.9.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for terrakio_api-0.9.3.tar.gz
Algorithm Hash digest
SHA256 62c5401fe8f2655267b6214d810df90b6005179d5aad8cab776404e00e5aebe7
MD5 6519e4085b28aa20068aa54112f6e58d
BLAKE2b-256 c035feea7f909330e123e2f49a52554bfc570ca88d668cdd6358255800200a15

See more details on using hashes here.

File details

Details for the file terrakio_api-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: terrakio_api-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for terrakio_api-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f7aae4fb79a99de18548d4704947e1505590dae367c59aec427f7ff4c4a30cb
MD5 3454587e485e13e3455e2480ade7334e
BLAKE2b-256 18ea48b1ebeebc9949d1e6e7898897133e78c19166c27e920e5f74406c8502bf

See more details on using hashes here.

Release history Release notifications | RSS feed

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.4

2 files

This release

0.9.3 This release

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.24

2 files

0.5.23

2 files

0.5.22

2 files

0.5.21

2 files

0.5.20

2 files

0.5.19

2 files

0.5.18

2 files

0.5.17

2 files

0.5.16

2 files

0.5.15

2 files

0.5.14

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3.1

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.98

2 files

0.4.97

2 files

0.4.96

2 files

0.4.95

2 files

0.4.94

2 files

0.4.93

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.0

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

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