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.4.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.4.0
File Size Uploaded
solcast-1.4.0.tar.gz 3.5 MB Details

Built distribution (wheel)

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

Total release size: 3.5 MB

Release files / solcast-1.4.0.tar.gz

Download URL solcast-1.4.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
36ec36a2c786e8b6b2f76f9c87e533049b40d1ca8b9e0258ac49e028fa0b3cef
BLAKE2b-256 checksum
How to use checksums
2b2151bd6692da31c01837cdf50c55863dc1457fdbaa6576972b8cc2bae72884
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.4.0-py3-none-any.whl

Download URL solcast-1.4.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c06271db59abc817d60ed90b870ec8ac52cd4f1e58f3e1a8f0697c2fda63dc61
BLAKE2b-256 checksum
How to use checksums
0f95613395dff5c8e0770233c27d0b332341abd81e59cf5a113ec8d7b07108b8
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

1.5.0

2 release files

This release

1.4.0 This release

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