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.
Prerequisites
This backend requires Flask 1.1 as a minimum requirement.
Usage
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 flaskapp.py:
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_APP=flaskapp.py FLASK_DEBUG=1 flask run
This assumes a standard Toga app layout, where the application myapp has a submodule app.py that defines a main() method.
Community
Toga is part of the BeeWare suite. You can talk to the community through:
The beeware/general channel on Gitter.
Contributing
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toga-flask-0.3.0.dev23.tar.gz.
File metadata
- Download URL: toga-flask-0.3.0.dev23.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c74429e34256527ff71f2edc0240507dd9bf556f1ab6566fcb8cd4fc9620a1d
|
|
| MD5 |
eaf19e4f81266a8749620551ac9c59c7
|
|
| BLAKE2b-256 |
e7d9765087c2b642f27e29a1e2f6cb6d49901e2046b062003d48435e69e43ea8
|
File details
Details for the file toga_flask-0.3.0.dev23-py3-none-any.whl.
File metadata
- Download URL: toga_flask-0.3.0.dev23-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87b1f0efffad890294cc68aa72d8ff1cbab3076856ef0dfe0a292cf24b4f0296
|
|
| MD5 |
533843539eb1f268568a2ce9ab465c82
|
|
| BLAKE2b-256 |
be9286d47ea702eb03dbbf23ef31443b03ba73b984fc25e10d19681afabf1df2
|