-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
22 lines (16 loc) · 781 Bytes
/
Copy pathexample.py
File metadata and controls
22 lines (16 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
this python-file demonstrates the basic usage of the pyAvaCore module
"""
from avacore import pyAvaCore
print("Enter region ID to print report:")
region_id = input("(e.g. 'FR-01' or 'AT-07-05'): ")
# Supported region ID's are listed in the REGIONS.md file
if region_id == "":
region_id = "AT-07-01"
print("Download Report for:", region_id)
bulletins = pyAvaCore.get_bulletins(region_id)
# reports contains all reports, that are delivered in a common provided file. Often this is all the reports of one state.
# If you want to have a report only for the region entered, you need to filter the reports list by the 'valid region' parameter.
# The report structure is defined in the AvaReport class in pyAvaCore.py
for report in bulletins.bulletins:
report.cli_out()