<!--
Copyright (c) 2022-2023 Geosiris.
SPDX-License-Identifier: Apache-2.0
-->
energyml-utils
==============
[](https://badge.fury.io/py/energyml-utils)
[](https://github.com/geosiris-technologies/geosiris-technologies/blob/main/energyml-utils/LICENSE)
[](https://geosiris-technologies.readthedocs.io/en/latest/?badge=latest)


Installation
------------
energyml-utils can be installed with pip :
```console
pip install energyml-utils
```
or with poetry:
```console
poetry add energyml-utils
```
Features
--------
### Supported packages versions
This package supports read/write in xml/json the following packages :
- EML (common) : 2.0, 2.1, 2.2, 2.3
- RESQML : 2.0.1, 2.2dev3, 2.2
- WITSMl : 2.0, 2.1
- PRODML : 2.0, 2.2
/!\\ By default, these package are not installed and are published independently.
You can install only the versions you need by adding the following lines in the .toml file :
```toml
energyml-common2-0 = "^1.12.0"
energyml-common2-1 = "^1.12.0"
energyml-common2-2 = "^1.12.0"
energyml-common2-3 = "^1.12.0"
energyml-resqml2-0-1 = "^1.12.0"
energyml-resqml2-2-dev3 = "^1.12.0"
energyml-resqml2-2 = "^1.12.0"
energyml-witsml2-0 = "^1.12.0"
energyml-witsml2-1 = "^1.12.0"
energyml-prodml2-0 = "^1.12.0"
energyml-prodml2-2 = "^1.12.0"
```
### Content of the package :
- Support EPC + h5 read and write
- *.rels* files are automatically generated, but it is possible to add custom Relations.
- You can add "raw files" such as PDF or anything else, in your EPC instance, and it will be package with other files in the ".epc" file when you call the "export" function.
- You can work with local files, but also with IO (BytesIO). This is usefull to work with cloud application to avoid local storage.
- Supports xml / json read and write (for energyml objects)
- *Work in progress* : Supports the read of 3D data inside the "AbstractMesh" class (and sub-classes "PointSetMesh", "PolylineSetMesh", "SurfaceMesh"). This gives you a instance containing a list of point and a list of indices to easily re-create a 3D representation of the data.
- These "mesh" classes provides *.obj*, *.off*, and *.geojson* export.
- Introspection : This package includes functions to ease the access of specific values inside energyml objects.
- Functions to access to UUID, object Version, and more generic functions for any other attributes with regex like ".Citation.Title" or "Cit\\.*.Title" (regular dots are used as in python object attribute access. To use dot in regex, you must escape them with a '\\')
- Functions to parse, or generate from an energyml object the "ContentType" or "QualifiedType"
- Generation of random data : you can generate random values for a specific energyml object. For example, you can generate a WITSML Tubular object with random values in it.
- Objects correctness validation :
- You can verify if your objects are valid following the energyml norm (a check is done on regex contraint attributes, maxCount, minCount, mandatory etc...)
- The DOR validation is tested : check if the DOR has correct information (title, ContentType/QualifiedType, object version), and also if the referenced object exists in the context of the EPC instance (or a list of object).
- Abstractions done to ease use with *ETP* (Energistics Transfer Protocol) :
- The "EnergymlWorkspace" class allows to abstract the access of numerical data like "ExternalArrays". This class can thus be extended to interact with ETP "GetDataArray" request etc...
- ETP URI support : the "Uri" class allows to parse/write an etp uri.
# Poetry scripts :
- extract_3d : extract a representation into an 3D file (obj/off)
- csv_to_dataset : translate csv data into h5 dataset
- generate_data : generate a random data from a qualified_type
- xml_to_json : translate an energyml xml file into json.
- json_to_xml : translate an energyml json file into an xml file
- describe_as_csv : create a csv description of an EPC content
Raw data
{
"_id": null,
"home_page": "http://www.geosiris.com",
"name": "energyml-utils",
"maintainer": "Valentin Gauthier",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "valentin.gauthier@geosiris.com",
"keywords": "energyml, resqml, witsml, prodml",
"author": "Valentin Gauthier",
"author_email": "valentin.gauthier@geosiris.com",
"download_url": "https://files.pythonhosted.org/packages/f0/34/4d659d793344e8b098e052eb8c3d4462879614aabf340cdf90b4b7ad2f23/energyml_utils-1.8.0.tar.gz",
"platform": null,
"description": "<!--\nCopyright (c) 2022-2023 Geosiris.\nSPDX-License-Identifier: Apache-2.0\n-->\nenergyml-utils\n==============\n\n[](https://badge.fury.io/py/energyml-utils)\n[](https://github.com/geosiris-technologies/geosiris-technologies/blob/main/energyml-utils/LICENSE)\n[](https://geosiris-technologies.readthedocs.io/en/latest/?badge=latest)\n\n\n\n\n\n\nInstallation\n------------\n\nenergyml-utils can be installed with pip : \n\n```console\npip install energyml-utils\n```\n\nor with poetry: \n```console\npoetry add energyml-utils\n```\n\n\nFeatures\n--------\n\n### Supported packages versions\n\nThis package supports read/write in xml/json the following packages : \n- EML (common) : 2.0, 2.1, 2.2, 2.3\n- RESQML : 2.0.1, 2.2dev3, 2.2\n- WITSMl : 2.0, 2.1\n- PRODML : 2.0, 2.2\n\n/!\\\\ By default, these package are not installed and are published independently.\nYou can install only the versions you need by adding the following lines in the .toml file : \n```toml\nenergyml-common2-0 = \"^1.12.0\"\nenergyml-common2-1 = \"^1.12.0\"\nenergyml-common2-2 = \"^1.12.0\"\nenergyml-common2-3 = \"^1.12.0\"\nenergyml-resqml2-0-1 = \"^1.12.0\"\nenergyml-resqml2-2-dev3 = \"^1.12.0\"\nenergyml-resqml2-2 = \"^1.12.0\"\nenergyml-witsml2-0 = \"^1.12.0\"\nenergyml-witsml2-1 = \"^1.12.0\"\nenergyml-prodml2-0 = \"^1.12.0\"\nenergyml-prodml2-2 = \"^1.12.0\"\n```\n\n### Content of the package :\n\n- Support EPC + h5 read and write\n - *.rels* files are automatically generated, but it is possible to add custom Relations.\n - You can add \"raw files\" such as PDF or anything else, in your EPC instance, and it will be package with other files in the \".epc\" file when you call the \"export\" function.\n - You can work with local files, but also with IO (BytesIO). This is usefull to work with cloud application to avoid local storage.\n- Supports xml / json read and write (for energyml objects)\n- *Work in progress* : Supports the read of 3D data inside the \"AbstractMesh\" class (and sub-classes \"PointSetMesh\", \"PolylineSetMesh\", \"SurfaceMesh\"). This gives you a instance containing a list of point and a list of indices to easily re-create a 3D representation of the data.\n - These \"mesh\" classes provides *.obj*, *.off*, and *.geojson* export.\n- Introspection : This package includes functions to ease the access of specific values inside energyml objects.\n - Functions to access to UUID, object Version, and more generic functions for any other attributes with regex like \".Citation.Title\" or \"Cit\\\\.*.Title\" (regular dots are used as in python object attribute access. To use dot in regex, you must escape them with a '\\\\')\n - Functions to parse, or generate from an energyml object the \"ContentType\" or \"QualifiedType\"\n - Generation of random data : you can generate random values for a specific energyml object. For example, you can generate a WITSML Tubular object with random values in it.\n- Objects correctness validation :\n - You can verify if your objects are valid following the energyml norm (a check is done on regex contraint attributes, maxCount, minCount, mandatory etc...)\n - The DOR validation is tested : check if the DOR has correct information (title, ContentType/QualifiedType, object version), and also if the referenced object exists in the context of the EPC instance (or a list of object).\n- Abstractions done to ease use with *ETP* (Energistics Transfer Protocol) :\n - The \"EnergymlWorkspace\" class allows to abstract the access of numerical data like \"ExternalArrays\". This class can thus be extended to interact with ETP \"GetDataArray\" request etc...\n- ETP URI support : the \"Uri\" class allows to parse/write an etp uri.\n\n\n# Poetry scripts : \n\n- extract_3d : extract a representation into an 3D file (obj/off)\n- csv_to_dataset : translate csv data into h5 dataset\n- generate_data : generate a random data from a qualified_type \n- xml_to_json : translate an energyml xml file into json.\n- json_to_xml : translate an energyml json file into an xml file\n- describe_as_csv : create a csv description of an EPC content\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Energyml helper",
"version": "1.8.0",
"project_urls": {
"Homepage": "http://www.geosiris.com",
"Repository": "https://github.com/geosiris-technologies/energyml-python"
},
"split_keywords": [
"energyml",
" resqml",
" witsml",
" prodml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "03ea8656e108f3276bd05a3cc711e7083bca01a3b53acd086e774395c51c3f8f",
"md5": "8ca082c6bc30ce6c7339882934afe0b5",
"sha256": "4a9ff05cccc1dd7aea9dbf8e3f344eb4403bf6bc9620519715ef93b877ff2cfa"
},
"downloads": -1,
"filename": "energyml_utils-1.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8ca082c6bc30ce6c7339882934afe0b5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 327680,
"upload_time": "2025-01-29T14:19:13",
"upload_time_iso_8601": "2025-01-29T14:19:13.190476Z",
"url": "https://files.pythonhosted.org/packages/03/ea/8656e108f3276bd05a3cc711e7083bca01a3b53acd086e774395c51c3f8f/energyml_utils-1.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0344d659d793344e8b098e052eb8c3d4462879614aabf340cdf90b4b7ad2f23",
"md5": "532e18dc011bc84b979450bdaf6c3fbe",
"sha256": "c3b34fc8ad1e31dafa738fe2e76b5b2a70c7f751089ec671dafec0de095f1535"
},
"downloads": -1,
"filename": "energyml_utils-1.8.0.tar.gz",
"has_sig": false,
"md5_digest": "532e18dc011bc84b979450bdaf6c3fbe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 319914,
"upload_time": "2025-01-29T14:19:15",
"upload_time_iso_8601": "2025-01-29T14:19:15.413428Z",
"url": "https://files.pythonhosted.org/packages/f0/34/4d659d793344e8b098e052eb8c3d4462879614aabf340cdf90b4b7ad2f23/energyml_utils-1.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 14:19:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "geosiris-technologies",
"github_project": "energyml-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "energyml-utils"
}