Skip to main content

Salient Predictions Software Development Kit

Project description

Intended Use

The Salient SDK is a python 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:

python3 --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 --upgrade
# to verify version with
pip show salientsdk

Usage

Command Line

The Salient SDK contains a full command line interface that can access each of the primary API functions without even opening python. You can get help for all options or specific commands:

python3 -m salientsdk --help
python3 -m salientsdk forecast_timeseries --help

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:

python3 -m salientsdk data_timeseries -lat 42 -lon -73 -fld all --start 2020-01-01 --end 2020-12-31 -u testusr -p testpwd

Via Python

In a python 3.11 script, this example code will login and request a historical ERA5 data timeseries.

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", session=session)
print(xr.open_file(history))

Note that this example uses the limited credentials testusr and testpwd. To access the full capabilities of your license, use your Salient-provided credentials.

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


Download files

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

Source Distribution

salientsdk-0.1.4.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

salientsdk-0.1.4-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file salientsdk-0.1.4.tar.gz.

File metadata

  • Download URL: salientsdk-0.1.4.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1017-azure

File hashes

Hashes for salientsdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 13c4e7215fc355f423840cbb653a5830f86aad891ebdf71657343935c8076368
MD5 8d92b262be3d7836724afd2993bc6aa4
BLAKE2b-256 79bd2a9b7ee1a6d9bb61d19c900c03ee5dfde2c19f00837100b7271350c2ecbf

See more details on using hashes here.

File details

Details for the file salientsdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: salientsdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1017-azure

File hashes

Hashes for salientsdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ffbe10f1b97e87092a6b00e375086f4978d14683dc6f22261f2921a3982aae5c
MD5 e00ab2e7b0ca6e34f191266cf6a99578
BLAKE2b-256 21f268d1c9f11997ba628e361eb59bb36cc1b2863e349e8631bee6028fa25978

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page