Skip to main content

A Flask backend for the Toga widget toolkit.

Project description

A Flask backend for the Toga widget toolkit.

This package isn’t much use by itself; it needs to be combined with the core Toga library and the Toga Web library.

For more details, see the Toga project on Github.


This backend requires Flask 1.1 as a minimum requirement.


Toga Flask defines a TogaApp class that can be used to mount a Toga Web instance in a Flask app. If you have Toga application named myapp, Flask deployment is acheived by putting the following into

from flask import Flask
flask_app = Flask(__name__)

from toga_flask import TogaApp

from myapp import app

TogaApp(app).route(flask_app, '/')

This will mount the Toga app at /. You can mount the app at any URL you wish, and you can also add other routes for other views.

The app can then be executed with:

$ FLASK_DEBUG=1 flask run

This assumes a standard Toga app layout, where the application myapp has a submodule that defines a main() method.


Toga is part of the BeeWare suite. You can talk to the community through:


If you experience problems with this backend, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for toga-flask, version 0.3.0.dev25
Filename, size File type Python version Upload date Hashes
Filename, size toga_flask-0.3.0.dev25-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size toga-flask-0.3.0.dev25.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page