epdnorway
Python module (pypi.org) to consume XML data from https://digi.epd-norge.no/ into any python project.
Requirements
python v3.7 xmltodict (xmltodict-0.12.0)
Usage
pip install epdnorway
Example usage:
from epdnorway import *
import pprint as pp
query dataset and show a json list result
res = epdnorway.list_query("limtre")
pp.pprint(res)
get a specific dataset, e.g. first of results
dataset = epdnorway.DataSet(res[0]["uuid"])
To get a list of available Exchange Flows:
dataset.availableFlows()
Correspondingly, to get available Impact Assessments:
dataset.availableImpactAssessments()
Data Points are now accessible as dataset.impactAssessments and dataset.exchangeFlows
Entire dataset is accessible in dataset.data
Possible Datapoints
Handled Datapoints are to be found in the following constants:
pp.pprint(epdnorway.EXCHANGE_FLOWS)
pp.pprint(epdnorway.LIFE_CYCLE_METHODS)
Data Points are stored as keys, and values in secondary keys in amounts
List possible amounts for modules:
pp.pprint(epdnorway.KNOWN_MODULES)
Get specific datapoints
Example: get the numbers for Global warming potential
>>> gwp = dataset.getImpact("GWP")
>>> gwp.data
{'id': '77e416eb-a363-4258-a04e-171d843a6460', 'name': 'Global warming potential', 'meanAmount': '0.0', 'unit': 'kg CO2-Äqv.', 'amounts': {'A1-A3': -679.0}}
get the reference flow of the dataset
>>> dataset.referenceFlow.data
{'id': '5ba9fce9-252d-457d-aea8-45d7d4c9a17d', 'name': 'Limtre', 'meanAmount': '1.0', 'resultingAmount': '1.0', 'version': '00.01.000'}
and the units for reference flow (if any):
>>> dataset.referenceFlow.units
[{'name': 'bulk density', 'desc': 'kilograms per cubic metre', 'unit': 'kg/m^3', 'value': '430.0'}]
Release files for epdnorway 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| epdnorway-0.3.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| epdnorway-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / epdnorway-0.3.tar.gz
| Download URL | epdnorway-0.3.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae9ed32e821364384f7b3b10d21ee4ca87a0d71a1131b347b39fb71ab4be8540
|
|
BLAKE2b-256 checksum How to use checksums |
00a1ce733dfc3f59edfe9a93220c6c588804bd360b61d629e21f51bd2daaf897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / epdnorway-0.3-py3-none-any.whl
| Download URL | epdnorway-0.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06d64181712caacdb561b2b6ec7dd8ac2d2fd69e946592796f9b0bac0d3fb6bc
|
|
BLAKE2b-256 checksum How to use checksums |
fe3cab97c376817f2e5fa802fb98aa4c0047c9ea384c2bd8cbf6b0496222d10c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|