# PyThermoLinkDB
![Downloads](https://img.shields.io/pypi/dm/PyThermoLinkDB) ![PyPI](https://img.shields.io/pypi/v/PyThermoLinkDB) ![Python Version](https://img.shields.io/pypi/pyversions/PyThermoLinkDB.svg) ![License](https://img.shields.io/pypi/l/PyThermoLinkDB)
PyThermoLinkDB is a Python package providing a robust and efficient interface between `PyThermoDB` and other applications. It enables seamless thermodynamic data exchange, integration, and analysis. With PyThermoLinkDB, developers can easily link PyThermoDB to various tools, frameworks, and databases, streamlining thermodynamic workflows.
**Key Features:**
- Simple and intuitive API
- Efficient data transfer and integration
- Compatible with multiple data formats
- Extensive documentation and examples
Ideal for researchers, engineers, and developers working with thermodynamic data, PyThermoLinkDB simplifies data integration and analysis, accelerating scientific discoveries and industrial applications.
## Installation
Install pyThermoLinkDB with pip
```python
import pyThermoLinkDB as ptdblink
# check version
print(ptdblink.__version__)
```
## Usage Example
```python
# import packages/modules
import pyThermoLinkDB as ptdblink
import pyThermoDB as ptdb
import os
from pprint import pprint as pp
```
### LOAD THERMODB
```python
# ! ethanol
# thermodb file name
EtOH_thermodb_file = os.path.join(os.getcwd(), 'test', 'ethanol.pkl')
# load
EtOH_thermodb = ptdb.load_thermodb(EtOH_thermodb_file)
print(type(EtOH_thermodb))
# check
pp(EtOH_thermodb.check())
# check properties
pp(EtOH_thermodb.check_properties())
# datastrcuture
pp(EtOH_thermodb.check_property('GENERAL').data_structure())
# ! methanol
# thermodb file name
MeOH_thermodb_file = os.path.join(os.getcwd(), 'test', 'methanol.pkl')
# load
MeOH_thermodb = ptdb.load_thermodb(MeOH_thermodb_file)
print(type(MeOH_thermodb))
# check
pp(MeOH_thermodb.check())
# ! CO2
CO2_thermodb_file = os.path.join(
os.getcwd(), 'test', 'Carbon Dioxide-multiple.pkl')
# load
CO2_thermodb = ptdb.load_thermodb(CO2_thermodb_file)
print(type(CO2_thermodb))
# check
pp(CO2_thermodb.check())
pp(CO2_thermodb.check_property('GENERAL').data_structure())
pp(CO2_thermodb.check_property('GENERAL-2').data_structure())
```
### THERMODB LINK CONFIGURATION
```python
# init thermodb hub
thub1 = ptdblink.thermodb_hub()
print(type(thub1))
# add component thermodb
thub1.add_thermodb('EtOH', EtOH_thermodb)
thub1.add_thermodb('MeOH', MeOH_thermodb)
thub1.add_thermodb('CO2', CO2_thermodb)
# * add thermodb rule
thermodb_config_file = os.path.join(os.getcwd(), 'test', 'thermodb_config.yml')
# one component
# thub1.config_thermodb_rule(thermodb_config_file, name='EtOH')
# all components
thub1.config_thermodb_rule(thermodb_config_file, name='ALL')
# thermodb
# pp(thub1.thermodb)
# thermodb rules
# pp(thub1.thermodb_rule)
# get components
pp(thub1.get_components())
# build
datasource, equationsource = thub1.build()
pp(datasource)
pp(equationsource)
# check
# pp(thub1.check())
```
### RETRIEVE DATA
```python
# data
pp(datasource['CO2']['Pc']['value'])
# equation
pp(equationsource['CO2']['VaPr'].args)
pp(equationsource['CO2']['VaPr'].cal(T=298.15))
```
## FAQ
For any question, contact me on [LinkedIn](https://www.linkedin.com/in/sina-gilassi/)
## Authors
- [@sinagilassi](https://www.github.com/sinagilassi)
Raw data
{
"_id": null,
"home_page": null,
"name": "PyThermoLinkDB",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "python, chemical engineering, thermodynamics, PyThermoDB",
"author": "Sina Gilassi",
"author_email": "<sina.gilassi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5c/ec/0058216d9e7b3d0f7b886a98742382f381f891dd60dc167cd888fb5a2af0/pythermolinkdb-1.0.0.tar.gz",
"platform": null,
"description": "\r\n# PyThermoLinkDB\r\n\r\n\r\n\r\n![Downloads](https://img.shields.io/pypi/dm/PyThermoLinkDB) ![PyPI](https://img.shields.io/pypi/v/PyThermoLinkDB) ![Python Version](https://img.shields.io/pypi/pyversions/PyThermoLinkDB.svg) ![License](https://img.shields.io/pypi/l/PyThermoLinkDB)\r\n\r\n\r\n\r\nPyThermoLinkDB is a Python package providing a robust and efficient interface between `PyThermoDB` and other applications. It enables seamless thermodynamic data exchange, integration, and analysis. With PyThermoLinkDB, developers can easily link PyThermoDB to various tools, frameworks, and databases, streamlining thermodynamic workflows.\r\n\r\n\r\n\r\n**Key Features:**\r\n\r\n\r\n\r\n- Simple and intuitive API\r\n\r\n- Efficient data transfer and integration\r\n\r\n- Compatible with multiple data formats\r\n\r\n- Extensive documentation and examples\r\n\r\n\r\n\r\nIdeal for researchers, engineers, and developers working with thermodynamic data, PyThermoLinkDB simplifies data integration and analysis, accelerating scientific discoveries and industrial applications.\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\nInstall pyThermoLinkDB with pip\r\n\r\n\r\n\r\n```python\r\n\r\nimport pyThermoLinkDB as ptdblink\r\n\r\n# check version\r\n\r\nprint(ptdblink.__version__)\r\n\r\n```\r\n\r\n\r\n\r\n## Usage Example\r\n\r\n\r\n\r\n```python\r\n\r\n# import packages/modules\r\n\r\nimport pyThermoLinkDB as ptdblink\r\n\r\nimport pyThermoDB as ptdb\r\n\r\nimport os\r\n\r\nfrom pprint import pprint as pp\r\n\r\n```\r\n\r\n\r\n\r\n### LOAD THERMODB\r\n\r\n\r\n\r\n```python\r\n\r\n# ! ethanol\r\n\r\n# thermodb file name\r\n\r\nEtOH_thermodb_file = os.path.join(os.getcwd(), 'test', 'ethanol.pkl')\r\n\r\n# load\r\n\r\nEtOH_thermodb = ptdb.load_thermodb(EtOH_thermodb_file)\r\n\r\nprint(type(EtOH_thermodb))\r\n\r\n\r\n\r\n# check\r\n\r\npp(EtOH_thermodb.check())\r\n\r\n# check properties\r\n\r\npp(EtOH_thermodb.check_properties())\r\n\r\n# datastrcuture\r\n\r\npp(EtOH_thermodb.check_property('GENERAL').data_structure())\r\n\r\n\r\n\r\n# ! methanol\r\n\r\n# thermodb file name\r\n\r\nMeOH_thermodb_file = os.path.join(os.getcwd(), 'test', 'methanol.pkl')\r\n\r\n# load\r\n\r\nMeOH_thermodb = ptdb.load_thermodb(MeOH_thermodb_file)\r\n\r\nprint(type(MeOH_thermodb))\r\n\r\n\r\n\r\n# check\r\n\r\npp(MeOH_thermodb.check())\r\n\r\n\r\n\r\n# ! CO2\r\n\r\nCO2_thermodb_file = os.path.join(\r\n\r\n os.getcwd(), 'test', 'Carbon Dioxide-multiple.pkl')\r\n\r\n# load\r\n\r\nCO2_thermodb = ptdb.load_thermodb(CO2_thermodb_file)\r\n\r\nprint(type(CO2_thermodb))\r\n\r\n\r\n\r\n# check\r\n\r\npp(CO2_thermodb.check())\r\n\r\npp(CO2_thermodb.check_property('GENERAL').data_structure())\r\n\r\npp(CO2_thermodb.check_property('GENERAL-2').data_structure())\r\n\r\n```\r\n\r\n\r\n\r\n### THERMODB LINK CONFIGURATION\r\n\r\n\r\n\r\n```python\r\n\r\n# init thermodb hub\r\n\r\nthub1 = ptdblink.thermodb_hub()\r\n\r\nprint(type(thub1))\r\n\r\n\r\n\r\n# add component thermodb\r\n\r\nthub1.add_thermodb('EtOH', EtOH_thermodb)\r\n\r\nthub1.add_thermodb('MeOH', MeOH_thermodb)\r\n\r\nthub1.add_thermodb('CO2', CO2_thermodb)\r\n\r\n\r\n\r\n# * add thermodb rule\r\n\r\nthermodb_config_file = os.path.join(os.getcwd(), 'test', 'thermodb_config.yml')\r\n\r\n# one component\r\n\r\n# thub1.config_thermodb_rule(thermodb_config_file, name='EtOH')\r\n\r\n# all components\r\n\r\nthub1.config_thermodb_rule(thermodb_config_file, name='ALL')\r\n\r\n\r\n\r\n# thermodb\r\n\r\n# pp(thub1.thermodb)\r\n\r\n\r\n\r\n# thermodb rules\r\n\r\n# pp(thub1.thermodb_rule)\r\n\r\n\r\n\r\n# get components\r\n\r\npp(thub1.get_components())\r\n\r\n\r\n\r\n# build\r\n\r\ndatasource, equationsource = thub1.build()\r\n\r\npp(datasource)\r\n\r\npp(equationsource)\r\n\r\n\r\n\r\n# check\r\n\r\n# pp(thub1.check())\r\n\r\n```\r\n\r\n\r\n\r\n### RETRIEVE DATA\r\n\r\n\r\n\r\n```python\r\n\r\n# data\r\n\r\npp(datasource['CO2']['Pc']['value'])\r\n\r\n\r\n\r\n# equation\r\n\r\npp(equationsource['CO2']['VaPr'].args)\r\n\r\npp(equationsource['CO2']['VaPr'].cal(T=298.15))\r\n\r\n```\r\n\r\n\r\n\r\n## FAQ\r\n\r\n\r\n\r\nFor any question, contact me on [LinkedIn](https://www.linkedin.com/in/sina-gilassi/) \r\n\r\n\r\n\r\n\r\n\r\n## Authors\r\n\r\n\r\n\r\n- [@sinagilassi](https://www.github.com/sinagilassi)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "PyThermoLinkDB is a Python package providing a robust and efficient interface between `PyThermoDB` and other applications.",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [
"python",
" chemical engineering",
" thermodynamics",
" pythermodb"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c1d7986341546f49ca15bda79e4dc8d1b796f95d682fb5c30660e06853bf345c",
"md5": "5b6acfd8611c13a6f98a05c4556400f9",
"sha256": "68b0f8b5e5dfd87e545d17e73313c5562095744252cdc85d8c75fb38d38b5e99"
},
"downloads": -1,
"filename": "PyThermoLinkDB-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5b6acfd8611c13a6f98a05c4556400f9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11668,
"upload_time": "2024-10-10T03:27:48",
"upload_time_iso_8601": "2024-10-10T03:27:48.291599Z",
"url": "https://files.pythonhosted.org/packages/c1/d7/986341546f49ca15bda79e4dc8d1b796f95d682fb5c30660e06853bf345c/PyThermoLinkDB-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5cec0058216d9e7b3d0f7b886a98742382f381f891dd60dc167cd888fb5a2af0",
"md5": "4e0d03ad9f0f5be3c3ac47b6a2bf6fb6",
"sha256": "04c2004bd1af191d36a884d9e7db620c5bff41b98df3f2d4b8897484acde3948"
},
"downloads": -1,
"filename": "pythermolinkdb-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4e0d03ad9f0f5be3c3ac47b6a2bf6fb6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11394,
"upload_time": "2024-10-10T03:27:50",
"upload_time_iso_8601": "2024-10-10T03:27:50.001997Z",
"url": "https://files.pythonhosted.org/packages/5c/ec/0058216d9e7b3d0f7b886a98742382f381f891dd60dc167cd888fb5a2af0/pythermolinkdb-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-10 03:27:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pythermolinkdb"
}