Solcast API Python SDK
Python SDK to access the Solcast API
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.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solcast-1.6.0.tar.gz | 3.5 MB | Without provenance | Details for solcast-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solcast-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for solcast-1.6.0-py3-none-any.whl |
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
|
Security for solcast 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.