Installation
- Install the package from the git repository
pip install git+https://github.com/AuroraEnergyResearch/aurora-amun-python-sdk
-
In order to use the Amun API a user token is required and can be created in EOS settings. Add your Aurora API key to the file $home/.aurora-api-key. for example
C:\Users\Joe Bloggs\.aurora-api-key
or set as the environment variableAURORA_API_KEY
. -
Once the key is set up the
AmunSession
object can be created to access the API. Examples of methods available can be found in AmunSession for details on usage.
from aurora.amun.client.session import AmunSession
session = AmunSession()
result = session.get_scenarios("gbr")
print(result[0])
Output to expect:
{'id': 3, 'name': '2019 Smart Power Scenario', 'description': 'To examine the impact of a smarter power system with more flexible capacity and demand', 'isRetired': True, 'region': 'gbr', 'S3uri': None, 'currency': 'GBP', 'currencyYear': 2018, 'publicationDate': '2020-01-09T17:02:05.000Z', 'type': 'legacy', 'scenarioVersion': 0, 'hash': 'a5da31ed-f72d-424e-9d41-a81873269dbc', 'hasFile': False}