When generating a web project, Briefcase produces a static folder of HTML, CSS
is packaged as a
.zip file for distribution.
Although Briefcase provides a
run command that can be used to serve the
website, this web server is provided as a development convenience. It should
not be used in production. If you wish to serve your app in production, you
can unzip the
.zip file in the root of any web server that can serve static
Web support is experimental!
PyScript (which forms the base of Briefcase’s web backend) is a new project; and Toga’s web backend is very new. As a result this web backend should be considered experimental.
Regardless of what Python version you run Briefcase with, the app will use PyScript’s current Python version (as of October 2022, this is 3.10).
There are also a number of constraints on what you can do in a web environment. Some of these are fundamental constraints on the web as a platform; some are known issues with PyScript and Pyodide as runtime environments. You shouldn’t expect that arbitrary third-party Python packages will “just run” in a web environment.
Web projects use a single 32px
.png format icon as the site icon.
Splash Image format#
Web projects do not support splash screens or installer images.
The following options can be added to the
tool.briefcase.app.<appname>.web section of your
Any additional configuration that you wish to add to the
for your deployed site. For example, you can use this to change the runtime
used by Briefcase when deploying your site.
extra_pyscript_toml_content is a string that defines valid TOML content;
this content will be parsed, and used to add values to the
generated by Briefcase, overriding any pre-existing keys. For example, to
define a custom runtime, and change the default PyScript app name, you could use:
extra_pyscript_toml_content = """ name = "My name override" [[runtimes]] src = "https://example.com/custom/pyodide.js" """
The following options can be provided at the command line when producing web projects:
--host <ip or hostname>#
The hostname or IP address that the development web server should be bound to.
-p <port> /
The port that the development web server should be bound to. Defaults to
Don’t open a web browser after starting the development web server.