Skip to main content

PyThermoLinkDB is a Python package providing a robust and efficient interface between `PyThermoDB` and other applications.

Project description

PyThermoLinkDB

Downloads PyPI Python Version License

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

import pyThermoLinkDB as ptdblink

# check version

print(ptdblink.__version__)

Usage Example

# import packages/modules

import pyThermoLinkDB as ptdblink

import pyThermoDB as ptdb

import os

from pprint import pprint as pp

LOAD THERMODB

# ! 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

# 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

# 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

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythermolinkdb-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

PyThermoLinkDB-1.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pythermolinkdb-1.0.0.tar.gz.

File metadata

  • Download URL: pythermolinkdb-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for pythermolinkdb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 04c2004bd1af191d36a884d9e7db620c5bff41b98df3f2d4b8897484acde3948
MD5 4e0d03ad9f0f5be3c3ac47b6a2bf6fb6
BLAKE2b-256 5cec0058216d9e7b3d0f7b886a98742382f381f891dd60dc167cd888fb5a2af0

See more details on using hashes here.

File details

Details for the file PyThermoLinkDB-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for PyThermoLinkDB-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b0f8b5e5dfd87e545d17e73313c5562095744252cdc85d8c75fb38d38b5e99
MD5 5b6acfd8611c13a6f98a05c4556400f9
BLAKE2b-256 c1d7986341546f49ca15bda79e4dc8d1b796f95d682fb5c30660e06853bf345c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page