Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streamlit configuration #30

Open
fabriziosalmi opened this issue Jun 29, 2024 · 0 comments
Open

streamlit configuration #30

fabriziosalmi opened this issue Jun 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@fabriziosalmi
Copy link
Owner

Is your feature request related to a problem? Please describe.
streamlit configuration via config.toml is missing.

Describe the solution you'd like
Add file .streamlit/config.tml like this:

# ~/.streamlit/config.toml

[global]
# Disable the warning about widget state duplication
disableWidgetStateDuplicationWarning = true
# Disable the warning when you run a Streamlit-enabled script via "python my_script.py"
showWarningOnDirectExecution = false

[logger]
# Set the logging level to 'debug' for detailed logs
level = "debug"
# Customize the log message format
messageFormat = "%(asctime)s [%(levelname)s] %(message)s"

[client]
# Show uncaught app exceptions and deprecation warnings in the browser
showErrorDetails = true
# Hide developer options for a cleaner UI
toolbarMode = "minimal"
# Show sidebar navigation in multi-page apps
showSidebarNavigation = true

[runner]
# Enable magic commands in the Python script
magicEnabled = true
# Handle script rerun requests immediately
fastReruns = true
# Enforce serialization of session state data
enforceSerializableSessionState = true
# Enum coercion to handle redefined Enum classes with both name and value matching
enumCoercion = "nameAndValue"

[server]
# List of folders to exclude from being watched for changes
folderWatchBlacklist = ["venv", "__pycache__"]
# Use the watchdog module for file watching
fileWatcherType = "watchdog"
# Enable headless mode for server (does not open a browser window on start)
headless = true
# Automatically rerun script when the file is modified on disk
runOnSave = true
# Set the server port
port = 8501
# Enable CORS protection for added security
enableCORS = true
# Enable XSRF protection for added security
enableXsrfProtection = true
# Increase max upload size to 500MB
maxUploadSize = 500
# Enable serving files from a `static` directory
enableStaticServing = true

[browser]
# Set the server address for connecting to the app
serverAddress = "localhost"
# Enable usage statistics gathering
gatherUsageStats = false

[mapbox]
# Set a custom Mapbox token (replace with your actual token)
token = "your_mapbox_token_here"

[theme]
# Set a dark theme as the base theme
base = "dark"
# Customize theme colors
primaryColor = "#1abc9c"
backgroundColor = "#2c3e50"
secondaryBackgroundColor = "#34495e"
textColor = "#ecf0f1"
# Use the Roboto font for all text
font = "sans serif"

# Load custom fonts
[theme.fonts]
body = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"
code = "https
@fabriziosalmi fabriziosalmi added the enhancement New feature or request label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant