⚗️ PyThermoDB Settings
📖 Introduction
PyThermoDB Settings is a Python package that acts as an interface between pythermdb and other applications, providing robust, Pydantic-based data models and configuration structures for managing thermodynamic database (ThermoDB) settings.
Calculations can also be done on your mobile with the MoziThermoCalc iOS app: Download on the App Store.
✨ Features
-
🧪 Component Modeling:
Define chemical components with attributes such as name, formula, state (gas, liquid, solid, aqueous), and mole fraction.
-
🌡️ Condition Models:
Represent temperature and pressure conditions with unit validation.
-
⚙️ Component Configuration:
TypedDict-based configuration for databook, table, mode, and custom labels.
-
📚 Reference Models:
ReferenceThermoDB: Structure for reference thermodynamic databases, including references, contents, configs, rules, and label management.ComponentReferenceThermoDB: Links a component to its reference database.ReferencesThermoDB: Handles multiple references and their configurations.
-
📏 Rule Management:
Define and manage rules for components using dictionary-based structures.
-
✅ Extensible and Validated:
All models use Pydantic for input validation and extensibility.
💾 Installation
Install via pip (after packaging):
pip install pythermodb_settings
🚀 Usage Example
from pythermodb_settings.models import Component, Temperature, Pressure
# component example
component = Component(
name="Water",
formula="H2O",
state="l",
mole_fraction=1.0
)
# condition examples
temperature = Temperature(value=298.15, unit="K")
pressure = Pressure(value=1.0, unit="atm")
📝 API Documentation
🧩 Models
-
Component
name: str — Name of the componentformula: str — Chemical formulastate: Literal['g', 'l', 's', 'aq'] — State (gas, liquid, solid, aqueous)mole_fraction: float — Mole fraction (default 1.0)
-
Temperature
value: float — Temperature valueunit: str — Unit (e.g., 'K', 'C', 'F')
-
Pressure
value: float — Pressure valueunit: str — Unit (e.g., 'bar', 'atm', 'Pa')
-
ComponentConfig
databook: str — Name of the databooktable: str — Table namemode: str — Mode (e.g., 'DATA', 'EQUATION')label: str — Optional labellabels: dict[str, str] — Optional labels
-
ReferenceThermoDB
reference: Dict[str, List[str]] — References and contentscontents: List[str] — Reference contentsconfigs: Dict[str, ComponentConfig] — Reference configsrules: Dict[str, ComponentRule] — Reference ruleslabels,ignore_labels,ignore_props: Optional label/property management
-
ComponentReferenceThermoDB
component: Componentreference_thermodb: ReferenceThermoDB
-
ReferencesThermoDB
- Handles multiple references, contents, configs, rules, and label management
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request to improve the project.
📝 License
This project is licensed under the MIT License. You are free to use, modify, and distribute this software in your own applications or projects. However, if you choose to use this app in another app or software, please ensure that my name, Sina Gilassi, remains credited as the original author. This includes retaining any references to the original repository or documentation where applicable. By doing so, you help acknowledge the effort and time invested in creating this project.
❓ FAQ
For any questions, contact me on LinkedIn.
👨💻 Authors
Metadata
Release files for pythermodb-settings 0.30.2
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 |
|---|---|---|---|---|
| pythermodb_settings-0.30.2.tar.gz | 59.3 kB | Without provenance | Details for pythermodb_settings-0.30.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pythermodb_settings-0.30.2-py3-none-any.whl | Python 3 | none | any | Details for pythermodb_settings-0.30.2-py3-none-any.whl |
Total release size: 127.0 kB
Release files / pythermodb_settings-0.30.2.tar.gz
| Download URL | pythermodb_settings-0.30.2.tar.gz |
|---|---|
| Size | 59.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
826b0901ea28ab33ca34c99613e4ad13e328d06607faa478a01be6071930826e
|
|
BLAKE2b-256 checksum How to use checksums |
7982198dd19d4dfc0e6125c1c1615301cc9c0750e881929970cca80f1ff642e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / pythermodb_settings-0.30.2-py3-none-any.whl
| Download URL | pythermodb_settings-0.30.2-py3-none-any.whl |
|---|---|
| Size | 67.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a45c8800d1f95745a42372893e293223f2e7767055f742d741128ca35e3fa95f
|
|
BLAKE2b-256 checksum How to use checksums |
c958eb28b6acfc6ce3dec01a5b31e3d1a52885ea6703350a8d328faaef4e00f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for pythermodb-settings 0.30.2
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.