Skip to content

The-Magicians-Code/nordumm-xml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NordPool data to XML from UMM with Python 3

The script's purpose is in the title

Run:
pipenv install to recreate the configured virtual environment
pipenv run python3 main.py --url https://ummapi.nordpoolgroup.com/messages -l 1 -e
--url Self explanatory, from nordpool
-l or --limit Maximum number of desired results
-e or --export Exports to outputs/result[0..n].xml files

One can also

from main import get_data, convert

# Export to file
# get_data("https://ummapi.nordpoolgroup.com/messages", export=True)

# Or gather to an object
data_json = get_data("https://ummapi.nordpoolgroup.com/messages")
print(data_json)

# you can do both at the same time too
# data_json = get_data("https://ummapi.nordpoolgroup.com/messages", export=True)

# Convert it to XML
data_xml = convert(data_json)
print(data_xml)

Releases

No releases published

Packages

No packages published

Languages