Skip to content

Chia-Network/core-registry-config-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-template

Template repo for Python-based projects

from core_registry_config import ConfigManager

# Define default config
default_config = {
    "TOKENIZATION_ENGINE": {
        "DATA_LAYER_HOST": "https://localhost:8562",
        "WALLET_HOST": "https://localhost:9256",
        "LOG_LEVEL": "info",
        "BIND_ADDRESS": "localhost"
    }
}

# Initialize the ConfigManager
config_manager = ConfigManager(default_config=default_config)

# Fetch the entire configuration
current_config = config_manager.get_config()
print("Current Config:", current_config)

# Update a specific key-value pair in the configuration
update_data = {
    "TOKENIZATION_ENGINE": {
        "DATA_LAYER_HOST": "https://newhost:8562"
    }
}
config_manager.update_config(update_data)

# Fetch the updated configuration
updated_config = config_manager.get_config()
print("Updated Config:", updated_config)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published