# mesop-dev/mesop

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mesop-dev-mesop).**

6,589 stars · 344 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/mesop-dev/mesop
- Homepage: https://mesop-dev.github.io/mesop/
- awesome-repositories: https://awesome-repositories.com/repository/mesop-dev-mesop.md

## Description

Mesop is a stateful, declarative Python web UI framework and component library designed for building interactive web applications and AI demos. It allows for the construction of data-driven interfaces and chat systems using only Python, removing the need to write separate HTML or CSS.

The framework is specifically tailored for AI application development, offering dedicated tools for conversational UI design and the creation of dashboards for large language model applications. It distinguishes itself with a visual UI editor for real-time property adjustments and the ability to embed custom JavaScript web components for extended frontend behavior.

The platform covers a broad range of capabilities including persistent session state management, multi-page application routing, and incremental UI streaming via generators. It also provides specialized components for interactive data tables and chat interfaces, alongside developer productivity tools like hot reloading.

Deployment utilities are included for containerization, cloud platform hosting, and reverse proxy routing configuration.

## Tags

### User Interface & Experience

- [Python-Based UI Frameworks](https://awesome-repositories.com/f/user-interface-experience/python-based-ui-frameworks.md) — Enables the creation of entire web interfaces using only high-level Python functions without HTML or CSS.
- [Application State Management](https://awesome-repositories.com/f/user-interface-experience/application-state-management.md) — Tracks and updates user data through state objects to control the interface flow and reflect real-time changes. ([source](https://mesop-dev.github.io/mesop/))
- [Conversational UI Kits](https://awesome-repositories.com/f/user-interface-experience/conversational-ui-kits.md) — Offers pre-built interface elements for creating chat histories and dialogue systems with streaming responses.
- [Declarative UI Libraries](https://awesome-repositories.com/f/user-interface-experience/declarative-ui-libraries.md) — Implements a system for defining user interfaces as a tree of components using declarative Python syntax.
- [Chat Interface Components](https://awesome-repositories.com/f/user-interface-experience/prebuilt-ui-components/chat-interface-components.md) — Provides prebuilt components for conversational history and text input to facilitate bot-user dialogues. ([source](https://mesop-dev.github.io/mesop/components/chat))
- [User Event Handlers](https://awesome-repositories.com/f/user-interface-experience/user-event-handlers.md) — Triggers server-side Python logic in response to user interactions with specific keyed UI elements. ([source](https://mesop-dev.github.io/mesop/components/))
- [Custom Element Definitions](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags/custom-element-definitions.md) — Allows for the definition of custom HTML elements using JavaScript and CSS for tailored visual appearances. ([source](https://mesop-dev.github.io/mesop/web-components/))
- [Custom Components](https://awesome-repositories.com/f/user-interface-experience/custom-components.md) — Allows embedding custom JavaScript web components into Python applications to extend frontend behavior.
- [Slot-Based Layouts](https://awesome-repositories.com/f/user-interface-experience/flexible-layout-nesting/slot-based-layouts.md) — Positions child components into predefined areas of a parent container using a named-slot system.
- [Custom Layouts](https://awesome-repositories.com/f/user-interface-experience/layout-components/custom-layouts.md) — Provides a flexible layout system for creating custom designs by combining primitives and pre-built elements. ([source](https://mesop-dev.github.io/mesop/blog/))
- [Reusable UI Components](https://awesome-repositories.com/f/user-interface-experience/reusable-ui-components.md) — Organizes interface elements into reusable functions and slots to simplify complex layout construction. ([source](https://mesop-dev.github.io/mesop/))
- [Visual Property Editors](https://awesome-repositories.com/f/user-interface-experience/styled-properties/visual-property-editors.md) — Features a visual editor for adjusting component properties and adding elements to the UI in real time. ([source](https://mesop-dev.github.io/mesop/blog/))

### Web Development

- [Client-Server State Synchronization](https://awesome-repositories.com/f/web-development/client-server-state-synchronization.md) — Provides a framework for synchronizing server-side state with the client-side browser view without full page reloads.
- [Multi-Page Application Frameworks](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/rendering-and-layout-architectures/multi-page-application-frameworks.md) — Supports the definition of multiple URL paths mapped to Python functions to create structured multi-page applications. ([source](https://mesop-dev.github.io/mesop/api/page/))
- [Declarative UI Frameworks](https://awesome-repositories.com/f/web-development/declarative-ui-frameworks.md) — Allows the construction of interactive web applications and logic using a single high-level declarative Python syntax. ([source](https://mesop-dev.github.io/mesop/demo/))
- [Python Data Dashboard Frameworks](https://awesome-repositories.com/f/web-development/python-data-dashboard-frameworks.md) — Facilitates the construction of data-driven web pages and dashboards using Python-based state and event handling.
- [Incremental Content Streaming](https://awesome-repositories.com/f/web-development/streaming-rendering/incremental-content-streaming.md) — Uses Python generators to push incremental UI updates to the browser as data is produced. ([source](https://mesop-dev.github.io/mesop/))
- [Client-Side Scripting](https://awesome-repositories.com/f/web-development/client-side-scripting.md) — Enables browser-based logic execution to handle stateful interactions and improve responsiveness by reducing network roundtrips. ([source](https://mesop-dev.github.io/mesop/web-components/))
- [Component Composition](https://awesome-repositories.com/f/web-development/component-composition.md) — Enables the construction of reusable interface elements by nesting custom functions or combining native components. ([source](https://mesop-dev.github.io/mesop/components/))
- [Page Load Logic Hooks](https://awesome-repositories.com/f/web-development/page-load-logic-hooks.md) — Runs specific data processing and state mutations upon page load to prepare the initial user interface. ([source](https://mesop-dev.github.io/mesop/api/page/))
- [UI Component Libraries](https://awesome-repositories.com/f/web-development/ui-component-libraries.md) — Supplies a collection of reusable UI primitives and layout elements for composing web pages.
- [Web Components](https://awesome-repositories.com/f/web-development/web-components.md) — Supports embedding custom HTML elements that execute client-side JavaScript with two-way server communication. ([source](https://mesop-dev.github.io/mesop/components/))

### Artificial Intelligence & ML

- [AI Application Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-application-frameworks.md) — Provides a framework specifically for building interactive web interfaces tailored for AI models.
- [UI Stream Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/video-generation/streaming-generation/token-stream-generators/ui-stream-generators.md) — Uses Python generators to push incremental interface updates to the browser in real-time.

### Data & Databases

- [Server-Side Session Stores](https://awesome-repositories.com/f/data-databases/session-state-management/server-side-session-stores.md) — Tracks application data on the server and synchronizes changes to the browser via a persistent state store.
- [Interactive Table Rendering](https://awesome-repositories.com/f/data-databases/dataframe-integration/interactive-table-rendering.md) — Renders data frames as interactive tables with sticky headers, columns, and clickable cells. ([source](https://mesop-dev.github.io/mesop/components/table))

### Security & Cryptography

- [Stateful Session Persistence](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/stateful-session-persistence.md) — Maintains persistent user session data across interactions using serializable classes. ([source](https://mesop-dev.github.io/mesop/guides/state-management/))

### Software Engineering & Architecture

- [Server-Side Interaction Callbacks](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures/server-side-interaction-callbacks.md) — Provides mechanisms to map client-side UI events to specific Python function execution on the server.
- [Widget Tree Reconciliation](https://awesome-repositories.com/f/software-engineering-architecture/trees/incremental-reconciliation/widget-tree-reconciliation.md) — Implements a reconciliation mechanism that updates the browser view by diffing server-side and client-side component trees.

### Development Tools & Productivity

- [Hot Code Reloading](https://awesome-repositories.com/f/development-tools-productivity/hot-code-reloading.md) — Automatically refreshes the browser during development to display code updates without losing application state. ([source](https://cdn.jsdelivr.net/gh/mesop-dev/mesop@main/README.md))
- [Rapid Prototyping Environments](https://awesome-repositories.com/f/development-tools-productivity/rapid-prototyping-environments.md) — Enables rapid prototyping of web apps via declarative syntax and a hot-reload preview.
