abx_spec_config.toml_util
Module Contents
Classes
Encode lambda functions in default values properly. Usage: |
|
Custom TomlEncoder to work around https://github.com/uiri/toml’s many encoding bugs. More info: https://github.com/fabiocaccamo/python-benedict/issues/439 |
Functions
Convert lax INI values into strict TOML-compliant (JSON) values |
|
Convert a string of INI config into its TOML equivalent (warning: strips comments) |
|
Data
API
- abx_spec_config.toml_util.load_ini_value(val: str) abx_spec_config.toml_util.JSONValue [source]
Convert lax INI values into strict TOML-compliant (JSON) values
- abx_spec_config.toml_util.convert(ini_str: str) str [source]
Convert a string of INI config into its TOML equivalent (warning: strips comments)
- class abx_spec_config.toml_util.JSONSchemaWithLambdas[source]
Bases:
pydantic.json_schema.GenerateJsonSchema
Encode lambda functions in default values properly. Usage:
json.dumps(value, encoder=JSONSchemaWithLambdas())
- class abx_spec_config.toml_util.CustomTOMLEncoder(**kwargs)[source]
Bases:
toml.encoder.TomlEncoder
Custom TomlEncoder to work around https://github.com/uiri/toml’s many encoding bugs. More info: https://github.com/fabiocaccamo/python-benedict/issues/439
toml.dumps(value, encoder=CustomTOMLEncoder())
Initialization