pyilcd
Installation
You can install pyilcd via [pip] from [PyPI]:
$ pip install pyilcd
Usage
from pyilcd import parse_file_contact_dataset, validate_file_contact_dataset, save_ilcd_file, Defaults
# Override defaults if needed, else skip. Defaults are already set.
Defaults.config_defaults("config.ini") # Replace with your own config file
# Validate the ContactDataset class against the ContactDataset schema.
validate_file_contact_dataset("data/invalid/sample_contact_invalid.xml") # Replace with your own XML file
>> data/contact/sample_contact_invalid.xml:17:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: Element '{http://lca.jrc.it/ILCD/Common}class', attribute 'level': 'a' is not a valid value of the atomic type '{http://lca.jrc.it/ILCD/Common}LevelType'. data/contact/sample_contact_invalid.xml:17:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element '{http://lca.jrc.it/ILCD/Common}class', attribute 'level': Warning: No precomputed value available, the value was either invalid or something strange happened.
# Parse the required XML file to ContactDataset class.
contactDataset = parse_file_contact_dataset("data/contact/sample_contact.xml") # Replace with your own XML file
contactDataset
>> <Element {http://lca.jrc.it/ILCD/Contact}contactDataSet at 0x1c85f20c780>
## Change whatever attributes you need changing.
dataSetInformation = contactDataset.contactInformation.dataSetInformation
dataSetInformation.UUID
>> 00000000-0000-0000-0000-000000000000
dataSetInformation.UUID = "10000000-0000-0000-0000-000000000000"
dataSetInformation.UUID
>> 10000000-0000-0000-0000-000000000000
## Save final ContactDataset class as an XML file, make sure root directory exists.
save_ilcd_file(contactDataset, "out/sample_contact_new.xml") # Replace with your own path
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the GPL 3.0 license, pyilcd is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for pyilcd 6.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyilcd-6.3.1.tar.gz | 119.5 kB | Without provenance | Details for pyilcd-6.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyilcd-6.3.1-py3-none-any.whl | Python 3 | none | any | Details for pyilcd-6.3.1-py3-none-any.whl |
Total release size: 252.7 kB
Release files / pyilcd-6.3.1.tar.gz
| Download URL | pyilcd-6.3.1.tar.gz |
|---|---|
| Size | 119.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68878f4bd0b746f150b0ac17f3947a454c58cc6b9fdea4be136c91815729e5ea
|
|
BLAKE2b-256 checksum How to use checksums |
09370725958ee9739d982627450931787a5661dff0356b26604e18abff8f5107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / pyilcd-6.3.1-py3-none-any.whl
| Download URL | pyilcd-6.3.1-py3-none-any.whl |
|---|---|
| Size | 133.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0092d53c154c41656514adeeae6f0cc96c45259a4e7c605e6eabfe8d513dd39f
|
|
BLAKE2b-256 checksum How to use checksums |
7798d51e4a67bc4aefdc07a83989ce83e842ac57b0bc2a540ff0fefe13511488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for pyilcd 6.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.