Skip to main content

A client library for Terrakio's WCS API service

Project description

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()

# Login to your account
token = client.login(email = "XXX", password = "XXX")
print(f"✓ Login successful, personal token: {token[:10]}...")

# The login account will automatically be used for the requests

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

# Create a geographic feature
point = Point(149.057, -35.1548)
geojson = {
     "type": "Feature",
     "geometry": {
          "type": "Point",
          "coordinates": [point.x, point.y]
     },
     "properties": {
          "name": "Location in Canberra region",
          "description": "Coordinates: 149.057, -35.1548"
     }
}

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

For more documentation, see the main repository.

Project details


Release history Release notifications | RSS feed

This version

0.3.0

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.3.0.tar.gz (2.5 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.3.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terrakio_api-0.3.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for terrakio_api-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b99bfdd5bb537c0d4646ad7f866cd40f327579b4a4712f6f4d9fd87e5fa932bb
MD5 28b84723eed50b607560279e8a62ecbc
BLAKE2b-256 854a9b601b7d553cf96ec976c43eb7874bb7d5f35a4e30798bca194adc04bfe9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: terrakio_api-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for terrakio_api-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b3fc73add13bab8c68b62cdbad1b7aa67ab66df99e35db714264bc145b87f1d
MD5 8c64f075292ab45acccb13fe75654b7c
BLAKE2b-256 66c7b9f489aa3e07996f5f25e4b1b3acb239a9d910fad111ae7e3635a169b04d

See more details on using hashes here.

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