mesop
Installation
SKILL.md
Mesop
Use this skill to build, debug, and deploy Mesop applications. Mesop is a Python-native UI framework that enables developers to build web apps without writing frontend code (HTML/CSS/JS).
Quick Triage
- Use this skill for pure Python web UIs, especially for AI/ML demos and internal tools.
- Do NOT use this skill if the user specifically requests a different Python framework (Streamlit, Gradio, Solara) unless they are asking for a comparison or migration.
- Do NOT use this skill for general Flask/FastAPI backend development unless it's specifically about mounting a Mesop app.
Workflow
- Setup: Install
mesopand createmain.py. - Define Page: Use
@me.page(path="/")to define the entry point. - Define State: Create a
@me.stateclassto hold session state (must be serializable). - Create Components: Build the UI tree using
me.box,me.text,me.input, etc. - Handle Events: Write event handler functions (regular or generator) to update state.
- Style: Apply styles using
me.Style(flexbox/grid) for layout and appearance. - Deploy: Deploy to Cloud Run, Docker, or Hugging Face Spaces.