A client library for Terrakio's WCS API service
Project description
Terrakio API Client
A Python client for Terrakio's Web Coverage Service (WCS) API.
Installation
Install the package using pip:
$ pip install terrakio-api==0.1.2
Configuration
-
Obtain a Personal Access Token:
-
Install the CLI
-
Generate your Personal Access Token
-
-
Create a configuration file (
~/.tkioapirc) with the following content:url: https://terrakio-server-candidate-d4w6vamyxq-ts.a.run.app/wcs_secure key: <PERSONAL-ACCESS-TOKEN>
Important Notes
- Always review and agree to the Terms and Conditions for each dataset you intend to download.
Test
Perform a small test retrieve of precipitation_m15 data:
import terrakio_api
from terrakio_api import Client
from terrakio_api.utils import create_point_feature
# 1. Initialize the client
client = Client() # This will read from ~/.tkioapirc
# 2. Create a geographic feature (point)
point = create_point_feature(lon=149.057, lat=-35.1548)
# 3. Make a WCS request
dataset = client.wcs(
expr="prec=RainfieldsCBR.precipitation_m15@(year=2024, month=1)\nprec",
feature=point,
output="netcdf" # Specify output format (csv, netcdf, etc.)
)
# 4. Work with the resulting xarray dataset
print(dataset)
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terrakio_api-0.1.2.tar.gz.
File metadata
- Download URL: terrakio_api-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22f1eb10d179483138755fa57bdff6e089c42bd76c844cb3ad9508d094045f3
|
|
| MD5 |
ed6eb77409fa85e7c8f853fc97c088b0
|
|
| BLAKE2b-256 |
2f9225b7ecd122a2867eaee03c4a0cff563c0d714f5d3cdd5138e0daf7f0843f
|
File details
Details for the file terrakio_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: terrakio_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
593fa2e3eae11b5bf9829e92f41bdeec103f54c04dd0b94bfef1144f01eddf95
|
|
| MD5 |
33522d31e2e634d6164cd8c21322a054
|
|
| BLAKE2b-256 |
b410738ad6c8c6e5db6d1a3ff682f98f5f5aef3762a4e3852cea90037f152e9d
|