Metadata-Version: 2.4
Name: conceptual-dictionary
Version: 0.1.1
Summary: A Python dictionary template for storing serializable metadata
Author: Sarath Menon, Abril Azocar Guzman
License: MIT License
        
        Copyright (c) 2025 pyscal
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/pyscal/conceptual_dictionary
Project-URL: Bug Tracker, https://github.com/pyscal/conceptual_dictionary/issues
Keywords: dictionary,metadata,serialization,conceptual
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pyyaml
Dynamic: license-file

# conceptual_dictionary

A Python dictionary template for storing serializable metadata.

## Installation

Install from source:

```bash
pip install -e .
```

## Usage

### Using Templates

Import and use predefined dictionary templates:

```python
from conceptual_dictionary.templates import sample_template, property_template, workflow_template

# Use a template directly
my_data = sample_template.copy()
my_data['material']['element_ratio'] = {'Fe': 0.7, 'C': 0.3}
my_data['simulation_cell']['volume']['value'] = 1000
```

### Using ConceptualDict Class

Work with conceptual dictionaries using the ConceptualDict class:

```python
from conceptual_dictionary.conceptualdict import ConceptualDict

# Create a new conceptual dictionary
cd = ConceptualDict()

# Set values using dot notation
cd.set("material.element_ratio.Fe", 0.7)
cd.set("material.element_ratio.C", 0.3)
cd.set("simulation_cell.volume.value", 1000)

# Get values
fe_ratio = cd.get("material.element_ratio.Fe")
volume = cd.get("simulation_cell.volume.value")

# Convert to standard dictionary
data = cd.to_dict()

# Serialize to JSON
json_str = cd.to_json(indent=2)

# Save to file
cd.save("my_conceptual.json")

# Load from file
cd_loaded = ConceptualDict.from_json("my_conceptual.json")
```

## Available Templates

- **sample_template**: Standard template with metadata, content, and schema sections
- **property_template**: Template for defining properties with values and units
- **workflow_template**: Template for describing workflows, including algorithms and methods

## License

MIT License
