Metadata-Version: 2.1
Name: nordpool-daily-averages
Version: 1.1.42
Summary: REST api wrapper for nordpool average daily spot prices
Author-email: Gunnar Svanberg <gus.svanberg@gmail.com>
License: MIT License
        
        Copyright (c) 2024 g-svanberg
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Source, https://github.com/g-svanberg/nordpool-imd-daily-average
Project-URL: Documentation, https://github.com/g-svanberg/nordpool-imd-daily-average/blob/main/README.md
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: pytz

![Ruff](https://github.com/g-svanberg/nordpool-imd-daily-average/actions/workflows/ruff.yaml/badge.svg)
![Push](https://github.com/g-svanberg/nordpool-imd-daily-average/actions/workflows/push_to_repo.yaml/badge.svg)

Python package for querying nordpool for average daily and hourly prices per kWh.
Prices can only be obtained for the current year and the previous year.
Incremet is how much you need to add to the price if you chargeback someone per kWh. It's optional and the default is zero.
Default timezone is "Europe/Stockholm" 

| Supported areacode's | Suported currency's | Increment | Timezone             |
| -------------------- | ------------------- | --------- | -------------------- |
| `"SE1"`              | `"SEK"`             | `"0.15"`  | `"Europe/Stockholm"` |
| `"SE2"`              | `"EUR"`             |
| `"SE3"`              |
| `"SE4"`              |
| `"NO1"`              |
| `"NO2"`              |
| `"NO3"`              |
| `"NO4"`              |
| `"NO5"`              |
| `"FI"`               |
| `"DK1"`              |
| `"DK2"`              |

| Environment variables | Usage                | Required | Syntax | Comment                      |
| --------------------- | -------------------- | -------- | ------ | ---------------------------- |
| LOGLEVEL              | stdout logging level | No       | DEBUG  | Defaults to INFO if not used |

## Usage:

`pip install nordpool-daily-averages`

```python
#Getting average price for 2024-08-30, for areacode SE3 and in Euro and 15 cents is added to the prices
from nordpool import Daily as daily
#instantiate class
price = daily("SE3", "EUR", "0.15")
#Get the price
price.get_prices_for_one_date("2024-08-30")
```

```python
#Getting average price for 2024-08-29 for areacode SE3 in SEK and 15 öre is added to the prices
from nordpool import Daily as daily
#instantiate class
price = daily("SE3", "SEK", "0.15")
#Get the price
price.get_prices_for_one_date("2024-08-29")
```

```python
#Getting average price for 2024-08-28 for areacode SE2 in SEK and no increment is added to the prices
from nordpool import Daily as daily
#instantiate class
price = daily("SE2", "SEK")
#Get the price
price.get_prices_for_one_date("2024-08-28")
```

```python
#Getting all price's for current year and last year for areacode SE2 in SEK and no increment is added to the prices
from nordpool import Daily as daily
#instantiate class
price = daily("SE2", "SEK")
#Get all price's
price.get_all_prices()
```

```python
import asyncio
from nordpool import Hourly as hour
#Getting hourly data prices for one date
async def main():
    #instantiate class
    daily_average = hour(areacode="SE3", currency="SEK")
    usage = await daily_average.get_hourly_prices("2024-09-04")
    print(usage)
asyncio.run(main())
```
