|
1 | | -<img src="https://github.com/Solcast/solcast-api-python-sdk/blob/main/docs/img/logo.png?raw=true" width="100" align="right"> |
2 | | - |
3 | | -# Solcast API Python SDK |
4 | | - |
5 | | -<em>Python SDK to access the Solcast API</em> |
6 | | - |
7 | | -[](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml) [](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml) [](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml) |
8 | | - |
9 | | ---- |
10 | | - |
11 | | -**Documentation**: <a href="https://solcast.github.io/solcast-api-python-sdk/" target="_blank">https://solcast.github.io/solcast-api-python-sdk/ </a> |
12 | | - |
13 | | -## Install |
14 | | -```commandline |
15 | | -pip install solcast |
16 | | -``` |
17 | | -or from source: |
18 | | -```commandline |
19 | | -git clone https://github.com/Solcast/solcast-api-python-sdk.git |
20 | | -cd solcast-api-python-sdk |
21 | | -pip install . |
22 | | -``` |
23 | | - |
24 | | -The vanilla version doesn't have any dependency. For full functionality, |
25 | | -for example for getting the data into `DataFrames`, and for development, use the `[all]` tag: |
26 | | -```commandline |
27 | | -pip install .[all] for the dev libs |
28 | | -``` |
29 | | - |
30 | | -## Basic Usage |
31 | | - |
32 | | -```python |
33 | | -from solcast import live |
34 | | - |
35 | | -df = live.radiation_and_weather( |
36 | | - latitude=-33.856784, |
37 | | - longitude=151.215297, |
38 | | - output_parameters=['air_temp', 'dni', 'ghi'] |
39 | | -).to_pandas() |
40 | | -``` |
41 | | - |
42 | | -Don't forget to set your [account Api Key](https://toolkit.solcast.com.au/register) with: |
43 | | -```export SOLCAST_API_KEY={your commercial api_key}``` |
44 | | - |
45 | | ---- |
46 | | - |
47 | | -## Contributing |
48 | | -Tests are run against the Solcast API, you will need an API key to run them. |
49 | | -They are executed on `unmetered locations` and as such won't consume your requests. |
50 | | - |
51 | | -```commandline |
52 | | -pytest tests |
53 | | -``` |
| 1 | +<img src="https://github.com/Solcast/solcast-api-python-sdk/blob/main/docs/img/logo.png?raw=true" width="100" align="right"> |
| 2 | + |
| 3 | +# Solcast API Python SDK |
| 4 | + |
| 5 | +<em>Python SDK to access the Solcast API</em> |
| 6 | + |
| 7 | +[](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/docs.yml) [](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/test.yml) [](https://github.com/Solcast/solcast-api-python-sdk/actions/workflows/publish-to-pypi.yml) |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +**Documentation**: <a href="https://solcast.github.io/solcast-api-python-sdk/" target="_blank">https://solcast.github.io/solcast-api-python-sdk/ </a> |
| 12 | + |
| 13 | +## Install |
| 14 | +```commandline |
| 15 | +pip install solcast |
| 16 | +``` |
| 17 | +or from source: |
| 18 | +```commandline |
| 19 | +git clone https://github.com/Solcast/solcast-api-python-sdk.git |
| 20 | +cd solcast-api-python-sdk |
| 21 | +pip install . |
| 22 | +``` |
| 23 | + |
| 24 | +The vanilla version doesn't have any dependency. For full functionality, |
| 25 | +for example for getting the data into `DataFrames`, and for development, use the `[all]` tag: |
| 26 | +```commandline |
| 27 | +pip install .[all] for the dev libs |
| 28 | +``` |
| 29 | + |
| 30 | +## Basic Usage |
| 31 | + |
| 32 | +```python |
| 33 | +from solcast import live |
| 34 | + |
| 35 | +df = live.radiation_and_weather( |
| 36 | + latitude=-33.856784, |
| 37 | + longitude=151.215297, |
| 38 | + output_parameters=['air_temp', 'dni', 'ghi'] |
| 39 | +).to_pandas() |
| 40 | +``` |
| 41 | + |
| 42 | +Don't forget to set your [account Api Key](https://toolkit.solcast.com.au/register) with: |
| 43 | +```export SOLCAST_API_KEY={your commercial api_key}``` |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Contributing |
| 48 | +Tests are run against the Solcast API, you will need an API key to run them. |
| 49 | +They are executed on `unmetered locations` and as such won't consume your requests. |
| 50 | + |
| 51 | +```commandline |
| 52 | +pytest tests |
| 53 | +``` |
0 commit comments