{"id":18838637,"url":"https://github.com/beeware/briefcase-web-static-template","last_synced_at":"2025-10-04T06:40:43.750Z","repository":{"id":61391177,"uuid":"545815139","full_name":"beeware/briefcase-web-static-template","owner":"beeware","description":"A template for generating static web projects with Briefcase.","archived":false,"fork":false,"pushed_at":"2024-12-10T22:04:39.000Z","size":510,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-12-30T09:14:12.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeware.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["freakboy3742"],"custom":["http://beeware.org/bee/join"]}},"created_at":"2022-10-05T02:48:14.000Z","updated_at":"2024-12-21T00:03:55.000Z","dependencies_parsed_at":"2023-11-18T03:28:40.480Z","dependency_job_id":"9e222881-4287-419a-bbea-1b5864c3fc9a","html_url":"https://github.com/beeware/briefcase-web-static-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-web-static-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-web-static-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-web-static-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-web-static-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeware","download_url":"https://codeload.github.com/beeware/briefcase-web-static-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774335,"owners_count":19694700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:40:08.696Z","updated_at":"2025-10-04T06:40:38.645Z","avatar_url":"https://github.com/beeware.png","language":"HTML","funding_links":["https://github.com/sponsors/freakboy3742","http://beeware.org/bee/join"],"categories":[],"sub_categories":[],"readme":"Briefcase Static Web Template\n=============================\n\nA `Cookiecutter \u003chttps://github.com/cookiecutter/cookiecutter/\u003e`__ template for\nbuilding Python apps that will run as statically-served web pages\n\nUsing this template\n-------------------\n\nThe easiest way to use this project is to not use it at all - at least, not\ndirectly. `Briefcase \u003chttps://github.com/beeware/briefcase/\u003e`__ is a tool that\nuses this template, rolling it out using data extracted from a\n``pyproject.toml`` configuration file.\n\nHowever, if you *do* want use this template directly...\n\n1. Install `cookiecutter`_. This is a tool used to bootstrap complex project\n   templates::\n\n    $ pip install cookiecutter\n\n2. Run ``cookiecutter`` on the template::\n\n    $ cookiecutter https://github.com/beeware/briefcase-web-static-template\n\n   This will ask you for a number of details of your application, including the\n   `name` of your application (which should be a valid PyPI identifier), and\n   the `Formal Name` of your application (the full name you use to describe\n   your app). The remainder of these instructions will assume a `name` of\n   ``my-project``, and a formal name of ``My Project``.\n\n3. Build a wheel for your project, and add it to ``www/static/wheels``.\n\n4. Add wheels for any additional project requirements to ``www/static/wheels``.\n\n5. Add a file named ``www/pyscript.toml`` to configure the PyScript\n   interpreter. At a minimum, it should include a ``packages`` declaration\n   that includes all the wheels in the ``www/static/wheels`` folder.\n\nIf you've done this correctly, a project with a formal name of ``My Project``,\nwith an app name of ``my-project`` should have a directory structure that\nlooks something like::\n\n    My Project/\n        app/\n            ...\n        www/\n            static/\n                css/\n                    briefcase.css\n                wheels/\n                    my_project-0.0.1-py3-none-any.whl\n                    other-1.2.3-py3-none-any.whl\n                favicon.png\n            index.html\n            pyscript.toml\n        briefcase.toml\n\nwith ``www/pyscript.toml`` containing::\n\n    packages = [\n        \"my_project-0.0.1-py3-none-any.whl\",\n        \"other-1.2.3-py3-none-any.whl\",\n    ]\n\nYou should now be able to serve the `www` folder as a static website::\n\n    $ python -m httpd.server --directory www\n\nNext steps\n----------\n\nOf course, running Python code isn't very interesting by itself - you'll be\nable to output to the web console, but that won't be visible to most users.\n\nWhen the page loads, it will attempt to run ``my_project`` as a module (i.e.,\nthe equivalent of running ``python -m my_project`` from the command line).\n\nTo do something interesting, you'll need to add some DOM objects. You can use\n`PyScript \u003chttps://pyscript.net\u003e`__ APIs to manipulator the DOM.\n\nAlternatively, you could use a cross-platform widget toolkit that supports the\nweb as a target (such as `Toga`_) to provide a GUI for your application.\n\n.. _cookiecutter: https://github.com/cookiecutter/cookiecutter\n.. _Toga: https://beeware.org/project/projects/libraries/toga\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-web-static-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeware%2Fbriefcase-web-static-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-web-static-template/lists"}