Create Cross-Platform Apps with Toga
This guide demonstrates how to convert a Panel application into a cross-platform desktop and mobile application using Toga and Briefcase.
Overview
Toga is a Python native, OS native, cross-platform GUI toolkit. Combined with Briefcase, a tool for converting Python projects into standalone native applications, you can package your Panel application to run on Windows, macOS, Linux, iOS, and Android.
Unlike pywebview, Toga provides a native UI framework, allowing you to integrate native controls alongside your Panel web content.
What you'll learn:
How to integrate Panel with Toga
How to package applications with Briefcase
How to create cross-platform distributions
Prerequisites
Basic familiarity with Panel applications
Understanding of your target platforms
Git installed
Installation
Install Briefcase, which will handle Toga and other dependencies:
:::{note} For Windows, this will install everything. For other OSes, refer to the BeeWare Tutorial | Install Dependencies guide. :::
Creating a Cross-Platform Application
Step 1: Initialize a Briefcase Project
Initialize a new project with Briefcase:
Briefcase will prompt you for project details:
Formal Name: "My Panel App"
App Name: "mypanelapp"
Bundle Identifier: "com.example.mypanelapp"
Project Name: "My Panel App"
Description: "A Panel app packaged with Toga"
Author: Your name
Author's Email: Your email
URL: Your project URL
License: Choose a license
GUI Framework: Select "Toga"
Step 2: Create Your Panel Application
Navigate to the source directory and modify the main application file. The structure will look like:
Edit src/mypanelapp/app.py to integrate Panel with Toga:
Step 3: Update Dependencies
Edit pyproject.toml to include Panel and its dependencies:
Step 4: Test in Development Mode
Test your application in development mode:
This runs your application using your local Python environment, which is faster for testing and debugging.
The app should look like:

Building and Packaging
Desktop Applications
Build for Your Platform
Build the application for your current platform:
This creates a native application bundle in the appropriate format for your OS.
Run the Built Application
Test the built application:
Package for Distribution
Create a distributable package:
This creates:
Windows: An MSI installer
macOS: A DMG file
Linux: DEB or RPM packages
Mobile Applications
iOS
Build for iOS (requires macOS):
Package for App Store:
:::{note}
We have not tested building Panel iOS apps with Toga and Briefcase. If you try it, we would love to hear about your experience.
Panel ships with a lot of JavaScript. Apple is strict about what gets packaged, so we don't know if they'll flag any of that during app submission.
Building for iOS requires a Mac, Xcode, and an Apple Developer account for distribution.
The BeeWare project provides iOS versions of Pandas and iOS versions of other dependencies with the eventual plan for these maintainers to create packages for iOS themselves.
:::
Android
Build for Android:
Package for Google Play:
:::{note}
We have not tested building Panel Android apps with Toga and Briefcase. If you try it, we would love to hear about your experience.
Building for Android requires Android SDK. Briefcase will help you install it if needed.
:::
Related Resources
Toga Positron: Boilerplate templates for Electron-like apps using Python. A Panel template could be added in the future.
Panel-Toga Desktop App A more advanced Panel + Toga app example.