Is it possible to have multiple config.toml

I have two separate apps is it possible to have a different config file for these two?

Hey @Mohamed_Abdullah_She

Just to clarify: do you have more than one streamlit apps living in the same directory?

If you have separate directories for your apps, you can simply add a file .streamlit/config.toml for each of them!

I have it in separate directory, Thanks for the help

Hi,

The config.toml and secrets.toml files in ./streamlit are readable via the Streamlit API, but if you want to use a toml file for something else then you can use Python’s built-in toml package:

import toml
dir = os.path.abspath(os.path.dirname(__file__))
if os.path.isfile(os.path.join(dir, 'my_service.toml')):
    service_settings = toml.load(os.path.join(dir, 'my_service.toml'))

service_settings will be a hierarchical dict object as per the toml spec.

Arvindra

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.