Skip to main content

A powerful YAML-based configuration system with references, expressions, and dynamic instantiation

Project description




CI Coverage PyPI License Documentation

YAML configuration meets Python

Define Python objects in YAML. Reference, compose, and instantiate them effortlessly.


Quick Start

pip install sparkwheel
# config.yaml
dataset:
  num_classes: 10
  batch_size: 32

model:
  _target_: torch.nn.Linear
  in_features: 784
  out_features: "%dataset::num_classes"  # Reference

training:
  steps_per_epoch: "$10000 // @dataset::batch_size"  # Expression
from sparkwheel import Config

config = Config()
config.update("config.yaml")

model = config.resolve("model")  # Actual torch.nn.Linear(784, 10)

Features

  • Declarative Objects - Instantiate any Python class with _target_
  • Smart References - @ for resolved values, % for raw YAML
  • Composition by Default - Dicts merge, lists extend automatically
  • Explicit Control - = to replace, ~ to delete
  • Python Expressions - Dynamic values with $
  • Schema Validation - Type-check with dataclasses

Get Started · Documentation · Quick Reference

Community

About

Sparkwheel is a hard fork of MONAI Bundle's config system, with the goal of making a more general-purpose configuration library for Python projects. It combines the best of MONAI Bundle and Hydra/OmegaConf, while introducing new features and improvements not found in either.

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

sparkwheel-0.0.10.tar.gz (49.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparkwheel-0.0.10-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file sparkwheel-0.0.10.tar.gz.

File metadata

  • Download URL: sparkwheel-0.0.10.tar.gz
  • Upload date:
  • Size: 49.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sparkwheel-0.0.10.tar.gz
Algorithm Hash digest
SHA256 8982aa17ae7ef949803a320c5f7e8a2ff8c6e12e7232656ff890e9e25d95eec2
MD5 81de342271f70496773fc8388c06e441
BLAKE2b-256 91935c03db0a3b063a8cd11c2a873443b4f4e56f109057665454af9fe73a634a

See more details on using hashes here.

File details

Details for the file sparkwheel-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: sparkwheel-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sparkwheel-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 14a54308f7eb691eb8089f376ee74694c9ee1bc417dbd71c01eda8b653fda7a8
MD5 0fad2cc5d05ee2e8e19ac20a8ea7b6fc
BLAKE2b-256 e6955528a9e0d9510ace944a1f4cad443e0796df6134e0bdad79c8cd30ace9f2

See more details on using hashes here.

Supported by

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