Skip to main content

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


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)

Uploaded Source

Built Distribution

skeletonkey-0.0.10-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page