Add your description here
Project description
⚗️ 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.
✨ 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythermodb_settings-0.1.7.tar.gz.
File metadata
- Download URL: pythermodb_settings-0.1.7.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f800b5ae97fce1f820de00de3e1224dab207ccdafe1fd745d35ee48fc9223a
|
|
| MD5 |
5752d9a2f1f62bffb212be3f2cc40dea
|
|
| BLAKE2b-256 |
04b1c4388f2188edafd53bc8bcdfe695e1a58c0bd1cab98d14df5e17e6cd8cfb
|
File details
Details for the file pythermodb_settings-0.1.7-py3-none-any.whl.
File metadata
- Download URL: pythermodb_settings-0.1.7-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9036415f901136eab18bbf2d5297818c9f06ca07044020c1e536050c1ab60e
|
|
| MD5 |
a2d7a0fab2e5a974fb62d32418087ed2
|
|
| BLAKE2b-256 |
2c1ceeb5599f7e04caf672fb5005a2c519911309bfba67fb76b8077886c0d2d5
|