pyilcd


Namepyilcd JSON
Version 6.3.0 PyPI version JSON
download
home_pagehttps://github.com/sami-m-g/pyilcd
SummaryA Python package that converts ILCD XML formats to their Python equivalents and export the same data back to XML.
upload_time2023-09-26 12:33:38
maintainerMina Sami
docs_urlNone
authorMina Sami
requires_python>=3.8
licenseGPL-3.0
keywords "brightway" "development"
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyilcd

[![PyPI](https://img.shields.io/pypi/v/pyilcd.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/pyilcd.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/pyilcd)][pypi status]
[![License](https://img.shields.io/pypi/l/pyilcd)][license]

[![Read the documentation at https://pyilcd.readthedocs.io/](https://img.shields.io/readthedocs/pyilcd/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/sami-m-g/pyilcd/actions/workflows/python-test.yml/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/sami-m-g/pyilcd/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi status]: https://pypi.org/project/pyilcd/
[read the docs]: https://pyilcd.readthedocs.io/
[tests]: https://github.com/sami-m-g/pyilcd/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/sami-m-g/pyilcd
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Installation

You can install _pyilcd_ via [pip] from [PyPI]:

```console
$ pip install pyilcd
```

## Usage

```python
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][Contributor Guide].

## License

Distributed under the terms of the [GPL 3.0 license][License],
_pyilcd_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue][Issue Tracker] along with a detailed description.


<!-- github-only -->

[command-line reference]: https://pyilcd.readthedocs.io/en/latest/usage.html
[License]: https://github.com/sami-m-g/pyilcd/blob/main/LICENSE
[Contributor Guide]: https://github.com/sami-m-g/pyilcd/blob/main/CONTRIBUTING.md
[Issue Tracker]: https://github.com/sami-m-g/pyilcd/issues

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sami-m-g/pyilcd",
    "name": "pyilcd",
    "maintainer": "Mina Sami",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "<sami.mg@outlook.com>",
    "keywords": "\"brightway\",\"development\"",
    "author": "Mina Sami",
    "author_email": "<sami.mg@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/05/c2/195cb6b6a41dc538d53c3f235b8a7f3d33fe17c9d8cffdcd9df76c21d447/pyilcd-6.3.0.tar.gz",
    "platform": "any",
    "description": "# pyilcd\n\n[![PyPI](https://img.shields.io/pypi/v/pyilcd.svg)][pypi status]\n[![Status](https://img.shields.io/pypi/status/pyilcd.svg)][pypi status]\n[![Python Version](https://img.shields.io/pypi/pyversions/pyilcd)][pypi status]\n[![License](https://img.shields.io/pypi/l/pyilcd)][license]\n\n[![Read the documentation at https://pyilcd.readthedocs.io/](https://img.shields.io/readthedocs/pyilcd/latest.svg?label=Read%20the%20Docs)][read the docs]\n[![Tests](https://github.com/sami-m-g/pyilcd/actions/workflows/python-test.yml/badge.svg)][tests]\n[![Codecov](https://codecov.io/gh/sami-m-g/pyilcd/branch/main/graph/badge.svg)][codecov]\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]\n\n[pypi status]: https://pypi.org/project/pyilcd/\n[read the docs]: https://pyilcd.readthedocs.io/\n[tests]: https://github.com/sami-m-g/pyilcd/actions?workflow=Tests\n[codecov]: https://app.codecov.io/gh/sami-m-g/pyilcd\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[black]: https://github.com/psf/black\n\n## Installation\n\nYou can install _pyilcd_ via [pip] from [PyPI]:\n\n```console\n$ pip install pyilcd\n```\n\n## Usage\n\n```python\nfrom pyilcd import parse_file_contact_dataset, validate_file_contact_dataset, save_ilcd_file, Defaults\n\n# Override defaults if needed, else skip. Defaults are already set.\nDefaults.config_defaults(\"config.ini\")  # Replace with your own config file\n\n# Validate the ContactDataset class against the ContactDataset schema.\nvalidate_file_contact_dataset(\"data/invalid/sample_contact_invalid.xml\")  # Replace with your own XML file\n>> 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.\n\n# Parse the required XML file to ContactDataset class.\ncontactDataset = parse_file_contact_dataset(\"data/contact/sample_contact.xml\")  # Replace with your own XML file\ncontactDataset\n>> <Element {http://lca.jrc.it/ILCD/Contact}contactDataSet at 0x1c85f20c780>\n\n## Change whatever attributes you need changing.\ndataSetInformation = contactDataset.contactInformation.dataSetInformation\ndataSetInformation.UUID\n>> 00000000-0000-0000-0000-000000000000\ndataSetInformation.UUID = \"10000000-0000-0000-0000-000000000000\"\ndataSetInformation.UUID\n>> 10000000-0000-0000-0000-000000000000\n\n## Save final ContactDataset class as an XML file, make sure root directory exists.\nsave_ilcd_file(contactDataset, \"out/sample_contact_new.xml\")  # Replace with your own path\n```\n\n## Contributing\n\nContributions are very welcome.\nTo learn more, see the [Contributor Guide][Contributor Guide].\n\n## License\n\nDistributed under the terms of the [GPL 3.0 license][License],\n_pyilcd_ is free and open source software.\n\n## Issues\n\nIf you encounter any problems,\nplease [file an issue][Issue Tracker] along with a detailed description.\n\n\n<!-- github-only -->\n\n[command-line reference]: https://pyilcd.readthedocs.io/en/latest/usage.html\n[License]: https://github.com/sami-m-g/pyilcd/blob/main/LICENSE\n[Contributor Guide]: https://github.com/sami-m-g/pyilcd/blob/main/CONTRIBUTING.md\n[Issue Tracker]: https://github.com/sami-m-g/pyilcd/issues\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "A Python package that converts ILCD XML formats to their Python equivalents and export the same data back to XML.",
    "version": "6.3.0",
    "project_urls": {
        "Homepage": "https://github.com/sami-m-g/pyilcd",
        "source": "https://github.com/sami-m-g/pyilcd",
        "tracker": "https://github.com/sami-m-g/pyilcd/issues"
    },
    "split_keywords": [
        "\"brightway\"",
        "\"development\""
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d208241b4784107a759c4a6e30b96179a377827bf2cc66214be0147333b9148b",
                "md5": "1e1d9fccad862f2ceec81024edcd5739",
                "sha256": "a87241f376cf85afdcce5872b8b86e35dddf00ae881f4d5d5ab12aa6c0816ae5"
            },
            "downloads": -1,
            "filename": "pyilcd-6.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e1d9fccad862f2ceec81024edcd5739",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 134283,
            "upload_time": "2023-09-26T12:33:37",
            "upload_time_iso_8601": "2023-09-26T12:33:37.204198Z",
            "url": "https://files.pythonhosted.org/packages/d2/08/241b4784107a759c4a6e30b96179a377827bf2cc66214be0147333b9148b/pyilcd-6.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05c2195cb6b6a41dc538d53c3f235b8a7f3d33fe17c9d8cffdcd9df76c21d447",
                "md5": "1ce12b4b1d5d28bd9b267b16d8cbea17",
                "sha256": "b377e7f00ba1da8d069323de320403cdd36ed878b78cfd6604c4f44f6c1f0051"
            },
            "downloads": -1,
            "filename": "pyilcd-6.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1ce12b4b1d5d28bd9b267b16d8cbea17",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 120439,
            "upload_time": "2023-09-26T12:33:38",
            "upload_time_iso_8601": "2023-09-26T12:33:38.802015Z",
            "url": "https://files.pythonhosted.org/packages/05/c2/195cb6b6a41dc538d53c3f235b8a7f3d33fe17c9d8cffdcd9df76c21d447/pyilcd-6.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-26 12:33:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sami-m-g",
    "github_project": "pyilcd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyilcd"
}
        
Elapsed time: 0.11656s