Salient Predictions Software Development Kit
Project description
Intended Use
The Salient SDK is a convenience wrapper around Salient Predictions' customer-facing
web API. It also contains utility functions for manipulating and analyzing the data delivered from the API.
Setting up the SDK
Prerequisites
The Salient SDK requires Python 3.11 to use. If you have Python installed, you can check your version with:
python --version
To get version 3.11:
# Ubuntu:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
# macOS:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install python@3.11
Installing the SDK
The easiest way to get the Salient SDK is to install it like any other package:
pip install salientsdk
Usage
To access the Salient API you will need a username
and password
provided by
your Salient representative. The universal credentials testusr
and testpwd
have limited permissions for testing and validation purposes:
python -m salientsdk.data_timeseries -lat 42 -lon -73 -fld all --start 2020-01-01 --end 2020-12-31 -u testusr -p testpwd
In a python script:
import salientsdk as sk
import xarray as xr
import netcdf4
session = sk.login("testusr","testpwd")
history = sk.data_timeseries(loc = Location(lat=42, lon=-73), field="all", variable="temp")
print(xr.open_file(history))
See all available functions in the API Reference.
The examples directory contains ipynb
notebooks to help you get started with common operations.
License
This SDK is licensed for use by Salient customers details.
Copyright 2024 Salient Predictions
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
File details
Details for the file salientsdk-0.1.3.tar.gz
.
File metadata
- Download URL: salientsdk-0.1.3.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Linux/5.15.0-1047-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdf6a34a2a5a73f75c6f004ab6eee6e2c419f68f14a643d1549689afbc5e1b82 |
|
MD5 | ec8446665c31dbdce1987cd0caa38a36 |
|
BLAKE2b-256 | 21ba5acce3777bd67150befe6b45645430e5b67a1b9f96f45988ccc4569913a0 |
File details
Details for the file salientsdk-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: salientsdk-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Linux/5.15.0-1047-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7caeaf4700734efac8b2fb4635d94b2e0ab8f4b78f700e1f4fdc67278875574 |
|
MD5 | adee5afd7518f469a0b05a770e6b3105 |
|
BLAKE2b-256 | 7f18c4eedbc032b3c9161b217455d7c6348041a185de76407eac10a8da38161b |