A YAML-based configuration management tool for separating code from prompts in LLMs
Project description
Konfigure
A YAML-based configuration management tool for separating code from prompts in LLMs.
Installation
# Install from PyPI
pip install konfigure
# Install from source
pip install git+https://github.com/sunnybak/konfigure.git#subdirectory=python
Usage
import konfigure
# Load a YAML file
config = konfigure.load('config.yaml')
# Access values using dot notation
print(config.a.b) # Prints the value of b in the a section
# Set values
config.a.b = 'new value'
config.new_section = {'key': 'value'}
# Render Jinja2 templates
template_value = config.a.b.render(variable='value')
# Save changes back to the file
konfigure.dump(config, 'config.yaml')
Features
- Load YAML configuration files into memory
- Access configuration values using dot notation
- Modify configuration values in memory
- Render string values as Jinja2 templates
- Save configuration back to YAML files
Development
Local Setup
# Clone the repository
git clone https://github.com/sunnybak/konfigure.git
cd konfigure/python
# Install in development mode
pip install -e .
# Install development dependencies
pip install -e ".[dev]"
Running Tests
# Run all tests
pytest
# Run tests with coverage
pytest --cov=konfigure
# Run a specific test file
pytest konfigure/tests/test_core.py
Building the Package
# Build the package
python -m build
# Install the built package
pip install dist/konfigure-0.1.0-py3-none-any.whl
License
MIT
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 konfigure-0.1.7.tar.gz.
File metadata
- Download URL: konfigure-0.1.7.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fbc97ae2dcccd1214e71a7ab96f35aa2db45d8af4c463ab4f9866c2d43321d3
|
|
| MD5 |
4de0adb655c3b41d051bc15fb477957e
|
|
| BLAKE2b-256 |
10b6400cc6ca9dca350188e3a7253d3910a53c404f925fd4ac926f4a14067683
|
Provenance
The following attestation bundles were made for konfigure-0.1.7.tar.gz:
Publisher:
workflow.yml on sunnybak/konfigure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
konfigure-0.1.7.tar.gz -
Subject digest:
4fbc97ae2dcccd1214e71a7ab96f35aa2db45d8af4c463ab4f9866c2d43321d3 - Sigstore transparency entry: 218815402
- Sigstore integration time:
-
Permalink:
sunnybak/konfigure@75e646a45a02d6e6401f22f5ce86d38f9e18d394 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sunnybak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@75e646a45a02d6e6401f22f5ce86d38f9e18d394 -
Trigger Event:
push
-
Statement type:
File details
Details for the file konfigure-0.1.7-py3-none-any.whl.
File metadata
- Download URL: konfigure-0.1.7-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d44935efd18808ebb2bfdac2423d6aec20ec0b7863038ef0ada15d7a517177a
|
|
| MD5 |
7a260f12f558ad1b24106d294e93f528
|
|
| BLAKE2b-256 |
12775f0b72a46ca4d304b1079c4472e8ca08154cec5ae903823284e73b926e70
|
Provenance
The following attestation bundles were made for konfigure-0.1.7-py3-none-any.whl:
Publisher:
workflow.yml on sunnybak/konfigure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
konfigure-0.1.7-py3-none-any.whl -
Subject digest:
8d44935efd18808ebb2bfdac2423d6aec20ec0b7863038ef0ada15d7a517177a - Sigstore transparency entry: 218815404
- Sigstore integration time:
-
Permalink:
sunnybak/konfigure@75e646a45a02d6e6401f22f5ce86d38f9e18d394 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sunnybak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@75e646a45a02d6e6401f22f5ce86d38f9e18d394 -
Trigger Event:
push
-
Statement type: