bbc1.core.bbc_config module

Copyright (c) 2017 beyond-blockchain.org.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class bbc1.core.bbc_config.BBcConfig(directory=None, file=None, default_confpath=None)[source]

Bases: object

System configuration

get_config()[source]

Return config dictionary

get_domain_config(domain_id, create_if_new=False)[source]

Return the part of specified domain_id in the config dictionary

get_json_config()[source]

Get config in json format

read_config()[source]

Read config file

remove_domain_config(domain_id)[source]

Remove the part of specified domain_id in the config dictionary

update_config()[source]

Write config to file (config.json)

bbc1.core.bbc_config.load_config(filepath)[source]
bbc1.core.bbc_config.update_deep(d, u)[source]

Utility for updating nested dictionary