Skip to main content

SS-RawData-API

Python interface for the Sheffield Solar rawdata API endpoints.

Documentation for the API is here.

How do I get set up?

Deployment

  • Run pip install ss-rawdata-api

Development

  • Clone the repo
  • Run pip install -e . (ideally in a conda env or similar)

Usage and code examples

from datetime import datetime
import pytz

from ss_rawdata_api import SSRawDataAPI

ss_rawdata_api = SSRawDataAPI(
    user_id=1,
    api_key="1a2b3c4d"
)
system_metadata = ss_rawdata_api.metadata
generation_data = ss_rawdata_api.download(
    start=pytz.utc.localize(datetime(2023, 1, 1, 0, 5)),
    end=pytz.utc.localize(datetime(2023, 1, 31, 0, 0)),
    period=5,
    n_processes=10
)

Command Line Utilities

The command line utility can be used to download data to a CSV file:

>> ss_rawdata_api -h
usage: ss_rawdata_api.py [-h] -s "<yyyy-mm-dd HH:MM:SS>" -e "<yyyy-mm-dd HH:MM:SS>" -o </path/to/output/dir>
                         [--period <5|30>] [--n_processes <n_processes>]
                         [--credentials </path/to/credentials/file.yaml>] [-http <http_proxy>]
                         [-https <https_proxy>] [--download-metadata]

This is a command line interface (CLI) for the SS-RawData-API module

options:
  -h, --help            show this help message and exit
  -s "<yyyy-mm-dd HH:MM:SS>", --start "<yyyy-mm-dd HH:MM:SS>"
                        Specify a UTC start date in 'yyyy-mm-dd HH:MM:SS' format (inclusive).
  -e "<yyyy-mm-dd HH:MM:SS>", --end "<yyyy-mm-dd HH:MM:SS>"
                        Specify a UTC end date in 'yyyy-mm-dd HH:MM:SS' format (inclusive).
  -o </path/to/output/dir>, --outdir </path/to/output/dir>
                        Specify a directory to write data to.
  --period <5|30>       Desired temporal resolution (in minutes) for PV outturn estimates. Default is 5.
  --n_processes <n_processes>
                        Number of threads to use when downloading historical data.
  --credentials </path/to/credentials/file.yaml>
                        Specify a YAML file containing API credentials.
  -http <http_proxy>, --http-proxy <http_proxy>
                        HTTP Proxy address
  -https <https_proxy>, --https-proxy <https_proxy>
                        HTTPS Proxy address
  --download-metadata   Download the system metadata as a separate file.

Jamie Taylor, 2023-07-05

The credentials file should look something like:

ss_rawdata_api:
    user_id: 1
    api_key: 1a2b3c4d

Documentation

  • To be added

Who do I talk to?

Authors

License

No license is defined yet - use at your own risk.

Metadata

Release files for ss-rawdata-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ss-rawdata-api 0.1.0
File Size Uploaded
ss_rawdata_api-0.1.0.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ss-rawdata-api 0.1.0
File Interpreter ABI Platform
ss_rawdata_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / ss_rawdata_api-0.1.0.tar.gz

Download URL ss_rawdata_api-0.1.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
10f5b314ff47fd2f38237b12b7f6595f92e7f65be080302516db0e5fea95835e
BLAKE2b-256 checksum
How to use checksums
6e4cecb365ad065eb5f55d67cbd26d1fb254739056a27b459e77fdee79587586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / ss_rawdata_api-0.1.0-py3-none-any.whl

Download URL ss_rawdata_api-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
472f8a78d61b6b4fab4ef0be4ca64028005dc07cfe47576a3ac90da7c333be63
BLAKE2b-256 checksum
How to use checksums
1e68368e5453eb02a3bd5a01adb3402c3714ebd7fa552b0b7dbba1a7d2a0e9ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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