Civics Check
America's 250th civics fair — offline quizzes, pavilion browsing, and the USCIS naturalization test bank. Pure Python; no accounts, no network required after install.
Runs on its own. You do not need the SAFE App Store monorepo — copy this directory anywhere, or install with pip.
Install (standalone)
From this directory (apps/civics-check in the monorepo, or a copy of that folder):
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
civics-check # console script → app.py
Or use the launcher (creates ~/.willow/apps/civics-check/.venv automatically):
./dev.sh # fair TUI (default)
./dev.sh --cli # stdlib fair map only
Run (standalone)
| What | Command |
|---|---|
| Primary entry | python3 app.py — SAFE manifest entry_point; launches Textual fair when installed, else CLI fair map |
| CLI fair only | python3 app.py --cli |
| TUI directly | python3 tui.py |
| After pip install | civics-check (same as python3 app.py) |
Rebuild catalog after editing sources:
python3 scripts/build_catalog.py
Monorepo (optional)
If you have the full safe-app-store checkout:
make install app=civics-check
make run app=civics-check # runs app.py in apps/civics-check
What you get
- Fair map — parchment lanes (Citizenship Court, Statehouse Row, Founders Hall, …) with pavilion tents
- Naturalization quiz — 10 questions, 6 of 10 to pass (same rule as USCIS civics)
- Speed round — 60 seconds against the full bank
- State matchups — capitals and admission order
- Timeline sort, quote match, colonies flashcards, amendment explorer, and more
- Local progress — missed-question tracking and scores in
civics_check.db(dev tree) or~/.willow/apps/civics-check/(pip install)
Keyboard (TUI)
| Key | Action |
|---|---|
↑ / ↓ or j / k |
Move between lanes / pavilions |
Enter |
Open selected pavilion |
Type answer + Enter |
Submit |
Esc |
Back to fair map |
q |
Quit |
1776 |
Liberty Bell commentary |
Data workflow
Never hand-edit data/catalog.json. It is compiled output.
- Edit JSON under
data/sources/(questions, presidents, numbers, links, fair schedule, …) - Rebuild:
python3 scripts/build_catalog.py - Test:
python3 -m unittest discover -s tests -v
Project layout
app.py Primary entry (SAFE) — TUI when Textual present, else fair CLI
tui.py Textual fair map + stage (optional direct launch)
tui_art.py Hero band, curtains, ASCII ceremony
engine.py Catalog facade shared by CLI and TUI
bell.py Liberty Bell narrator + Joan Stark banner art
db.py Local SQLite scores / missed questions
civics/
catalog.py Load compiled catalog
paths.py Resolve app root + data/ (dev, editable, wheel)
scoring.py Answer matching
session.py Activity state machine
scripts/
build_catalog.py Compile sources → catalog.json
data/
sources/ Authoritative JSON (edit these)
catalog.json Generated — do not edit
tests/
dev.sh Standalone launcher (venv + catalog + run)
pyproject.toml pip install -e . / civics-check console script
safe-app-manifest.json
SAFE manifest
Registered as civics-check in the SAFE App Store monorepo (entry_point: app.py). Permissions: file_write for local SQLite only.
License
MIT — see LICENSE.
ΔΣ=42
Metadata
Release files for safe-app-civics-check 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| safe_app_civics_check-0.1.0.tar.gz | 239.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| safe_app_civics_check-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 384.2 kB
Release files / safe_app_civics_check-0.1.0.tar.gz
| Download URL | safe_app_civics_check-0.1.0.tar.gz |
|---|---|
| Size | 239.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb8e8db2ec74c687f7a74bb01444a516d63e7cf121b539c0c3541c19e2bb553
|
|
BLAKE2b-256 checksum How to use checksums |
95ca23849748f420030504ed754964cc843903d69f3f7bc29154f9f79ad4b65a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / safe_app_civics_check-0.1.0-py3-none-any.whl
| Download URL | safe_app_civics_check-0.1.0-py3-none-any.whl |
|---|---|
| Size | 144.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdc7ef1342e2146b992e0705950c72513b07e21463ba0dc85afa5a45e70205cc
|
|
BLAKE2b-256 checksum How to use checksums |
561e5979cacef205c9f98bf743cc672ad3c2b37ae537be969bb63006425b9f8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for safe-app-civics-check 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.