API reference

Apps

byoc.App(*args, **kwargs)

byoc.BareMeta

A metaclass that allows a class to be instantiated either in the usual way, or without calling the constructor.

byoc.init(obj)

byoc.load(obj[, config_cls])

byoc.reload(obj[, config_cls])

byoc.on_load(f)

byoc.insert_config(obj, i, config_factory)

byoc.insert_configs(obj, i, config_factories)

byoc.append_config(obj, config_factory)

byoc.append_configs(obj, config_factories)

byoc.prepend_config(obj, config_factory)

byoc.prepend_configs(obj, config_factories)

byoc.share_configs(donor, acceptor)

Configs

byoc.Config(obj, **kwargs)

byoc.EnvironmentConfig(obj, **kwargs)

byoc.CliConfig(obj, **kwargs)

byoc.ArgparseConfig(obj, **kwargs)

byoc.DocoptConfig(obj, **kwargs)

byoc.AppDirsConfig(obj, **kwargs)

byoc.FileConfig(obj[, path, path_getter, ...])

byoc.YamlConfig(obj[, path, path_getter, ...])

byoc.TomlConfig(obj[, path, path_getter, ...])

byoc.NtConfig(obj[, path, path_getter, ...])

byoc.JsonConfig(obj[, path, path_getter, ...])

byoc.Layer()

byoc.DictLayer(values, *[, schema, ...])

byoc.FileNotFoundLayer(path)

byoc.config_attr([config_cls, getter])

byoc.dict_like(*args)

byoc.lookup(obj, key)

Lookup the given key in the given object.

Parameters

byoc.param(*keys[, cast, pick, default, ...])

byoc.inherited_param(*args, **kwargs)

byoc.toggle_param(*keys[, cast, default, ...])

byoc.toggle(value)

byoc.pick_toggled(values)

Getters

byoc.Key(config_cls[, key])

byoc.Method(*args[, dynamic])

byoc.Func(callable, *[, skip, dynamic])

byoc.Value(value, **kwargs)

Key functions

byoc.jmes(expr)

Cast functions

byoc.relpath(context[, root_from_meta])

Resolve paths loaded from a file.

byoc.int_eval(expr)

Same as arithmetic_eval(), but convert the result to int.

byoc.float_eval(expr)

Same as arithmetic_eval(), but convert the result to float.

byoc.arithmetic_eval(expr)

Evaluate the given arithmetic expression.

byoc.Context(value, meta, obj)

Extra information that can be made available to cast functions.

Pick functions

byoc.first(it)

byoc.list(it)

byoc.merge_dicts(*a, **kw)

Metadata

byoc.meta_view()

byoc.get_meta(obj, param)

Errors

byoc.NoValueFound(message, log)

The default exception raised when no value can be found for a parameter.