Skip to content

Commit baea41d

Browse files
committedNov 8, 2022
Added documentation & fixed imports
1 parent 1201718 commit baea41d

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed
 

‎README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
# nordpool-db
2-
Library for storing retrieving and storing Nord Pool spot data in order to tell cheapest hours
1+
# nordpool_db
2+
3+
Library for storing retrieving and storing Nord Pool spot data in order to tell cheapest hours.
4+
5+
## Installing
6+
7+
`pip3 install git+https://github.com/mplattu/nordpool_db.git`
8+
9+
## Upgrading
10+
11+
`pip3 install -U git+https://github.com/mplattu/nordpool_db.git`
12+
13+
## Examples
14+
15+
See `examples/`

‎examples/cheapest_hours.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytz
66

77
from nordpool import elspot
8-
from nordpool_db import NordpoolDb
8+
from nordpool_db import nordpool_db
99

1010
SQLITE_DB = "/tmp/npdb_example.db"
1111

@@ -17,7 +17,7 @@
1717
if os.path.isfile(SQLITE_DB):
1818
print(f'Warning: Using your existing database at {SQLITE_DB}')
1919

20-
nordpool_db = NordpoolDb(SQLITE_DB)
20+
nordpool_db = nordpool_db.NordpoolDb(SQLITE_DB)
2121
tz = pytz.timezone(TZ)
2222
dt_yesterday = tz.localize(datetime.today()-timedelta(days=1))
2323

‎examples/dump_prices.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import datetime, timedelta
55

66
from nordpool import elspot
7-
from nordpool_db import NordpoolDb
7+
from nordpool_db import nordpool_db
88

99
SQLITE_DB = "/tmp/npdb_example.db"
1010
AREAS = ['FI', 'EE']
@@ -14,7 +14,7 @@
1414
if os.path.isfile(SQLITE_DB):
1515
print(f'Warning: Using your existing database at {SQLITE_DB}')
1616

17-
nordpool_db = NordpoolDb(SQLITE_DB)
17+
nordpool_db = nordpool_db.NordpoolDb(SQLITE_DB)
1818

1919
dt_today = datetime.today()
2020
dt_yesterday = datetime.today()-timedelta(days=1)

0 commit comments

Comments
 (0)
Please sign in to comment.