Skip to main content

Solcast API Python SDK

Python SDK to access the Solcast API

Docs Tests Publish 📦 to PyPI


Documentation: https://solcast.github.io/solcast-api-python-sdk/

Install

pip install solcast

or from source:

git clone https://github.com/Solcast/solcast-api-python-sdk.git
cd solcast-api-python-sdk
pip install .

The base solcast sdk install requires only the python standard library. Pandas is the only optional dependency that adds functionality to the package.

pip install solcast pandas

The example notebooks use a variety of optional dependencies to showcase different ways in which the Solcast API may be used. To install these dependencies run

pip install solcast[all]

N.B. Installs for [all] using Python 3.8 and Windows will not work due to an issue with pywinpty

Basic Usage

from solcast import live

res = live.radiation_and_weather(
    latitude=-33.856784,
    longitude=151.215297,
    output_parameters=['air_temp', 'dni', 'ghi']
)
res.to_dict()
res.to_pandas()  # requires optional pandas installation

Don't forget to set your account Api Key with: export SOLCAST_API_KEY={your commercial api_key}


Contributing

Tests are run against the Solcast API, you will need an API key to run them. They are executed on unmetered locations and as such won't consume your requests.

pytest tests

Docs

From the directory run

mkdocs build
mkdocs serve

In a browser navigate to localhost:8000 to see the documentation.

Formatters and Linters

Language Formatter/Linter
yaml yamlls
toml taplo
python black

Recommended Python Development Version

Develop on the oldest supported Python version.

uv python pin 3.8

Metadata

Release files for solcast 1.5.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 solcast 1.5.0
File Size Uploaded
solcast-1.5.0.tar.gz 3.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for solcast 1.5.0
File Interpreter ABI Platform
solcast-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.5 MB

Release files / solcast-1.5.0.tar.gz

Download URL solcast-1.5.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ebbcefda1d9c8b87f5ffccec7ca82dcff6bf4dab88ff1038dae4c026c9b619ef
BLAKE2b-256 checksum
How to use checksums
23034059f2e1ac73ee7bb45fb26cd488a961c0c994ac8eb6448938e1eae9f8a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / solcast-1.5.0-py3-none-any.whl

Download URL solcast-1.5.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
168863566e665620450bcc9b5bfc2155dd4ea1514f99e34b28e16c3a919dd02c
BLAKE2b-256 checksum
How to use checksums
8411d9c61f29234bfc1e856156ae99adf0c171b316eb540119d45525b3c4732a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.6.0

2 release files

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.2.1

1 release file

0.2.0

2 release files

0.1.0

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