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

Develop on the oldest supported Python version.

uv python pin 3.8

Metadata

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

Built distribution (wheel)

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

Total release size: 3.5 MB

Release files / solcast-1.6.0.tar.gz

Download URL solcast-1.6.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
5df5cfc4274af203585d64e593057e079cb16ef62dff41f874a7a9c75a14dfb1
BLAKE2b-256 checksum
How to use checksums
b84c87685f8f92884bbd2612ed5684227c636a7b4deb1cf18c03fc865dc03b29
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.6.0-py3-none-any.whl

Download URL solcast-1.6.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3add152155dbf15ea8e19780ea52a5dc2044957366030732e61de0fe4bb2670f
BLAKE2b-256 checksum
How to use checksums
ffddd6383a4808b5a0adc109088da7c1a6328bb2b25d43aa87a06b7a2ce3a514
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

This release

1.6.0 This release

2 release files

1.5.0

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