Entrypoints and Hot Reload
Hot reload is a development technique that allows your application to automatically update when it detects changes in the source code. This is especially useful during development to speed up the iteration process, since you can edit directly your files from MINEO.
For Development vs Production
⚠️ Important: Hot reload configurations are primarily designed for development environments. In production, it's recommended to use standard entrypoints without automatic reload for better stability and performance.
Streamlit: Native Hot Reload
Streamlit includes its own efficient hot reload system that doesn't require additional tools:
# For development (with native hot reload)
pip install --no-cache-dir streamlit && streamlit run app.py --server.port 8000 --server.runOnSave=true --server.fileWatcherType=poll
# For production (without hot reload)
pip install --no-cache-dir streamlit && streamlit run app.py --server.port 8000
Advantages of Streamlit's native approach:
- Faster and more efficient
- Better framework integration
- Lower resource consumption
Other Frameworks: Using Watchfiles
For frameworks like FastAPI, Gradio, or custom applications that don't have built-in hot reload, you can use watchfiles:
FastAPI with Hot Reload
# For development (with watchfiles)
pip install --no-cache-dir watchfiles fastapi uvicorn && watchfiles "uvicorn main:app --host 0.0.0.0 --port 8000 --proxy-headers --forwarded-allow-ips='*' --root-path ${MINEO_LIVE_APP_URL_PATH%/}" .
# For production (without hot reload)
pip install --no-cache-dir fastapi uvicorn && uvicorn main:app --host 0.0.0.0 --port 8000 --proxy-headers --forwarded-allow-ips='*' --root-path "${MINEO_LIVE_APP_URL_PATH%/}"
The --proxy-headers --forwarded-allow-ips='*' --root-path "${MINEO_LIVE_APP_URL_PATH%/}" flags make redirects, HTTPS, and /docs work behind MINEO's proxy. See FastAPI for the full explanation. Keep your code as plain app = FastAPI() — don't set root_path= there.
Gradio with Hot Reload
# For development (with watchfiles)
pip install --no-cache-dir watchfiles gradio && watchfiles "python app.py" .
# For production (without hot reload)
pip install --no-cache-dir gradio && python app.py
Custom Application
# For development (with watchfiles)
pip install --no-cache-dir watchfiles && watchfiles "python your_custom_app.py" .
# For production (without hot reload)
python your_custom_app.py
Advanced Watchfiles Configuration
You can customize watchfiles behavior according to your needs:
# Monitor only specific files
watchfiles "python app.py" app.py utils.py
# With custom interval (default: 500ms)
watchfiles --interval 1000 "python app.py" .
# Ignore specific directories
watchfiles --ignore-paths "logs,__pycache__" "python app.py" .
Performance Considerations
- Development: Use hot reload for fast iteration
- Production: Disable hot reload for better performance
- Resources: Watchfiles consumes more CPU than native solutions
- Stability: In production, avoid automatic restarts that could interrupt service
Best Practices
- During development: Use entrypoints with hot reload
- Before production deploy: Switch to standard entrypoints
- For Streamlit: Prefer the native solution over watchfiles
- Monitor resources: Hot reload can increase CPU usage in environments with many files
Hot reload is a powerful tool for development, but as with any tool, use it consciously according to your application's context.
📄️ Streamlit
Creating a Streamlit Live App on MINEO is a simple and efficient way to deploy interactive web applications. Follow the steps below to set up your own Streamlit Live App:
📄️ Gradio
Creating a Gradio Live App on MINEO is an easy and effective way to deploy interactive web applications. Follow these steps to set up your own Gradio Live App:
📄️ Dash
Setting up a Dash Live App on MINEO is a hassle-free way to deploy interactive web applications. Follow these steps to create your own Dash Live App:
📄️ FastAPI
Setting up a FastAPI Live App on MINEO is an efficient way to deploy highly performant web applications. Follow the steps below to create your own FastAPI Live App:
📄️ Entrypoints and Hot Reload
Hot reload is a development technique that allows your application to automatically update when it detects changes in the source code. This is especially useful during development to speed up the iteration process, since you can edit directly your files from MINEO.
📄️ Per-User Authenticated MCP
Host an MCP server on MINEO whose tools know which user invoked them — and prove it, so no user can ever pretend to be another. MINEO attaches a short-lived, signed token to every tool call; your server checks the signature with a public key and trusts the identity inside. No popups, no shared secrets, no way for the assistant to lie about who it is.
📄️ Accessing Authenticated User Information
When you enable the login_required option in your MINEO Live App, you can access authenticated user information through HTTP headers. These headers are automatically sent to your Streamlit application when a user logs in.