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/OmegaComf, 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.9.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.9-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sparkwheel-0.0.9.tar.gz
  • Upload date:
  • Size: 49.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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.9.tar.gz
Algorithm Hash digest
SHA256 604cded3ecc6c8dceb5b769e9eb273e15e0dc206598b549ad18595f842ab80bc
MD5 4f00ad58e047f6a16f653a601094a39b
BLAKE2b-256 e53eeea7646716b39fe523c42e7672df5c0a4d3087351c809ba6cf59e3ce09e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sparkwheel-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d18f6eef804ead414c1dad3fab055ee4e701e67d6f91461b8ce08f71c9cd7b28
MD5 70b4f761eb614cab204b8398336fc4e7
BLAKE2b-256 b6a5d03dce442b1226905837a07668399fa9232cc73a2684041df3b0cedc0229

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