ReportConfig

class nbreport.repo.ReportConfig(path, data=None)

Bases: object

Configuration for a report repository or instance (the nbreport.yaml file).

Parameters:
path : pathlib.Path or str

Path to the nbreport.yaml configuration file.

data : dict, optional

Initial data to insert into the configuration.

Methods

items() Iterate over key-value pairs in the configuration file.
keys() Get the sequence of keys at the top-level of the configuration file.
update(configs) Update a configuration with the given key-value pairs.

Methods Summary

items() Iterate over key-value pairs in the configuration file.
keys() Get the sequence of keys at the top-level of the configuration file.
update(configs) Update a configuration with the given key-value pairs.

Methods Documentation

items()

Iterate over key-value pairs in the configuration file.

Yields:
key : str

Key.

value : obj

Value

keys()

Get the sequence of keys at the top-level of the configuration file.

Returns:
sequence of `str`

Sequence of keys.

update(configs)

Update a configuration with the given key-value pairs.

Parameters:
configs : dict

Dictionary with configuration key-value pairs.

Notes

Only those keys that are provided will be updated. New keys can also be inserted this way.