GitXplorerGitXplorer
x

pyodide-flask-template

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
ff6a9d6594b2876d8e62908df477c481cdede1fe

Update main.py

xxhlulu committed 3 years ago
Unverified
999083d345c0e94ee121e030339227e944fff77b

Remove temp file, clarify readme

committed 3 years ago
Unverified
d3b168b9a27f744b4aa9597f77ff1e8f2b9d3a4e

first commit

committed 3 years ago

README

The README file for this repository.

This template is useful to start serving pure JS+pyodide webpages without further dependencies.

File structure

static/
    css/
        main.css
    js/
        main.js
    py/
        main.py
    index.html
app.py

Let's go over the files:

  • app.py: An extremely simple flask app that displays static/index.html and serves everything else in static to your browser.
  • static/index.html: The homepage. It loads the JS scripts, CSS styles, and creates an empty div called id="layout". You can edit this file to add any other static files (js, css) that you created.
  • static/main.js: Generic code to fetch the python file, load pyodide, and run the python file with pyodide.py. You can modify this if you want to fetch and run other python files you added.
  • static/main.css: An empty stylesheet, where you can add your custom styles for index.html.
  • static/main.py: A placeholder python script that you can directly modify.