How to Upload a New Config Using the Python SDK

Besides configuring Mona via the configuration page in the dashboard, users can upload a new config file to Mona via our Python SDK. (see SDK installation here).

Mona's SDK provides a simple way to upload a new Mona configuration, using Client.upload_config()

# Note: no need to add your tenant_id as the key, just the configuration itself.

new_configuration = <Your new Mona configuration>
upload_result = my_client.upload_config(new_configuration, "My commit message")

# the return value format will be:
# upload_result == {
#    "success": <was the upload successful>, (bool)
#    "new_config_id": <the new configuration ID> (str)
#}

You can also receive your current Mona configuration like this:

my_current_mona_config = my_client.get_config()