Skip to content
Project template·Pro

Flask + SQLite web app

A reading list in Flask with server-rendered pages and plain forms, SQLite storage and a small JSON API. The tests use Flask's test client. It needs Python and pip in the Linux environment and installs 7 pinned packages.

You need PocketCode Pro to install it.

If PocketCode is installed on your Android device, this opens the page in the app.

Preview

Files

README.md
app.py
readinglist/__init__.py
readinglist/db.py
readinglist/static/style.css
readinglist/templates/index.html
readinglist/views.py
requirements.txt
tests/__init__.py
tests/test_app.py

README.md

# Reading list: Flask + SQLite A small web app in Python: a reading list where you add titles and links, mark them as read and delete them. Pages are rendered on the server with Jinja templates and plain forms (no JavaScript), data goes to SQLite, and there is a JSON API for the same list. Comes with tests. ## Run it in PocketCode You need the app's Linux environment with Python 3.10 or newer and pip (the Developer pack in Terminal › Linux includes both). 1. Open the terminal in this project's folder (Open Terminal Here, in the editor menu). 2. Install Flask and what it needs (7 small packages, versions pinned in `requirements.txt`; needs internet): ```sh python3 -m pip install --break-system-packages -r requirements.txt ``` 3. Start the server: ```sh python3 app.py ``` Or open `app.py` and tap Run. 4. Open http://localhost:5000 in the DevBrowser (or in the phone's browser). Stop it with Ctrl+C in the terminal, or Stop in the Run panel. If you prefer a virtual environment: `python3 -m venv .venv`, then `. .venv/bin/activate` and `pip install -r requirements.txt`. ## Run the tests ```sh python3 -m unittest -v ``` They use a temporary database, so your list is not touched. ## Where things are | Path | What it does |

This preview is shortened. You get the full content when you install it.

Changes in 1.0.0

First version.

Related

Python CLI with SQLiteProProject templateAn expense tracker for the terminal. It adds and lists expenses, totals them per category each month and exports CSV. It only uses the standard library (argparse, sqlite3), so there's nothing to pip install, and it has unittest tests. It needs Python in the Linux environment.FastAPI link shortenerProProject templateA link shortener in Python with FastAPI and SQLite: it creates short codes, redirects and counts clicks. It comes with a one-page form and pytest tests. It needs Python 3.10 or newer with pip in the Linux environment and installs 14 pinned packages.Python CSV reportProProject templateA script that turns a CSV of sales into a summary in the terminal and an HTML page with bar charts of totals per month, category and product. It only uses the standard library and includes sample data and tests. It needs Python in the Linux environment.Express + SQLite tasks APIProProject templateA tasks API on Express 5 with filtering, paging and tests. Data goes to node:sqlite, so nothing native has to compile. It needs the Linux environment with Node.js 22.13 or newer, and npm install fetches about 3.5 MB.Next.js + Tailwind + i18nProProject templateNext.js 15 project with next-intl and Tailwind CSS, and one page in English and Spanish at /en and /es. Dark mode follows the system. Needs the Linux environment with Node.js; the first npm install downloads around 400 MB.Static landing pageProProject templateA one-page site in plain HTML and CSS with a header and folding menu, a hero, a feature grid, an FAQ and a footer. Colours follow the system's light or dark setting. There is no build step and it doesn't need Linux: open index.html and tap the globe icon.