-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
38 lines (30 loc) · 1.37 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from typing import Any
class Constants:
"""
Holds constants for use by other modules.
"""
# Directories
DATA = "tmp/data/"
LOGS = "tmp/logs/"
# Names for data
RAW_GENERATION_DATA_NAME = "raw_generation_data.feather"
RAW_DEMAND_DATA_NAME = "raw_demand_data.feather"
RAW_PRICE_DATA_NAME = "raw_cost_data.feather"
RAW_CARBON_DATA_NAME = "raw_carbon_data.feather"
RAW_PIECHART_DATA_NAME = "raw_piechart_data.feather"
# Paths to local storage for data
RAW_GENERATION_DATA_PATH = DATA + RAW_GENERATION_DATA_NAME
RAW_DEMAND_DATA_PATH = DATA + RAW_DEMAND_DATA_NAME
RAW_PRICE_DATA_PATH = DATA + RAW_PRICE_DATA_NAME
RAW_CARBON_DATA_PATH = DATA + RAW_CARBON_DATA_NAME
# Endpoints
GENERATION_ENDPOINT = "https://data.elexon.co.uk/bmrs/api/v1/datasets/FUELINST"
DEMAND_ENDPOINT = "https://data.elexon.co.uk/bmrs/api/v1/generation/outturn"
PRICE_ENDPOINT = "https://data.elexon.co.uk/bmrs/api/v1/balancing/settlement/system-prices/"
CARBON_ENDPOINT = "https://api.carbonintensity.org.uk/intensity/date"
PIECHART_ENDPOINT = "https://api.carbonintensity.org.uk/generation"
CARBON_ENDPOINT = "https://api.carbonintensity.org.uk/intensity/date"
# S3 Data
S3_BUCKET = "c12-energy-tracker"
def __setattr__(self, name: str, value: Any) -> None:
raise AttributeError(f"Can't Reassign Constant {name}")