A bare-bones configuration managment tool.
Project description
bones: A Bare-bones Configuration Management Tool
Bones is a simple, lightweight, and flexible configuration management tool that allows you to manage complex configurations for your applications using YAML files. It dynamically loads classes and their arguments at runtime, making it easy to set up and modify your projects.
Usage
Below is an example of how to use Bones in your project:
import bones
class MyModel:
def __init__(self, layer_size: int, activation: str) -> None:
self.layer_size = layer_size
self.activation = activation
@bones.skeleton_key("config.yaml")
def main(args):
model = bones.instantiate(args.model)
print("Model layer size: ", model.layer_size)
print("Model activation: ", model.activation)
print("Number of Epochs: ", args.epochs)
if __name__ == "__main__":
main()
To run the example above, create a config.yaml file with the following content:
epochs: 128
model:
_target_: MyModel
layer_size: 128
activation: relu
To run the script and overwrite default arguments, use the command:
python project.py --epochs 256
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
skeletonkey-0.0.10.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for skeletonkey-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec781e08bb4469109366a9ba2e5934c65e1a80d2f743d931a44c39ee75248d78 |
|
MD5 | 74c444441accf6edd15480bda645faf5 |
|
BLAKE2b-256 | f78c18c0d3785a2fc07e68fdc36b17042576f4b72aaf2072ad46502eb37abc9e |