Python learnings, Rustlings-style, in a terminal TUI.
Project description
Pylings
Documentation: pylings.abhik.ai
Python learnings, Rustlings-style, in a live terminal TUI.
Pylings helps you learn Python by fixing small broken programs and watching checks rerun as you type. It is built for beginner Python practice, coding practice, and self-paced Python tutorial workflows: 292 exercises, hidden pytest-style checks, a live Textual editor, progressive hints, and bundled Python documentation snippets so learners can work without leaving the terminal.
Status: v0.1.0 alpha. GitHub installs are available now; the PyPI package
name is python-learnings and will become the primary install path after
publishing is enabled.
Highlights
- 292 Python exercises across 31 topics, from variables through async.
- Rustlings-inspired learn-by-doing flow for Python coding practice.
- Live in-terminal editor with automatic checks after edits.
- Topic picker with progress, resume state, reset, hints, and one-shot CLI runs.
F5opens a local Python reference window;Oopens the official docs page.- Bundled docs are generated from the official Python documentation for offline use.
Who It Is For
- Python beginners who want short, focused practice instead of passive reading.
- Rustlings users who want the same fix-and-verify loop for Python.
- Learners who prefer working in a terminal with local docs close to the code.
- Contributors interested in building curriculum, checks, and terminal UX.
What Happens When You Run It
pylings initcreates a self-contained learner workspace with exercises, hidden checks, local docs, and original snapshots for reset.pylingsopens the first pending exercise in the terminal UI.- You edit the broken code, remove
# I AM NOT DONE, and checks rerun as you work. - Passing checks mark the exercise complete and move progress forward.
F4opens the topic picker,F5opens local docs, andEscquits main screens.
Install
Install the current release directly from GitHub:
pipx install "git+https://github.com/abhiksark/pylings.git@v0.1.0"
After PyPI publishing is enabled, the package install will be:
pipx install python-learnings
The pylings command is installed by the python-learnings package. The PyPI
project name pylings is already used by another package, so do not use
pip install pylings for this project.
For the latest development build from main:
pipx install --force git+https://github.com/abhiksark/pylings.git
Create a learner workspace before starting:
pylings init --path ~/pylings-workspace
cd ~/pylings-workspace
pylings
For local development:
git clone git@github.com:abhiksark/pylings.git
cd pylings
pip install -e ".[dev]"
Quick Start
pylings init --path ./learn-python # create a self-contained workspace
cd learn-python
pylings # open the TUI on the first pending exercise
pylings topics # open the topic picker
pylings list # show topic progress
pylings hint variables1 # print a hint and docs link
pylings run variables1 # run one exercise check
pylings dry-run variables1 # run one exercise non-interactively
pylings reset variables1 --yes # restore an exercise from its original
pylings update # refresh checks/docs after upgrading pylings
Each exercise contains a # I AM NOT DONE marker. Fix the code, remove the
marker, and let the live check advance you to the next exercise.
Demo
The demo is generated from docs/demo.tape. See docs/DEMO_GIF.md to regenerate it with VHS. It covers the first-run flow, progress listing, hints, the coding screen, local docs, topic picker, and quit path.
Interface
| Key | Action |
|---|---|
F1 |
Toggle hint |
F2 |
Reset the current exercise |
F3 |
Toggle the exercise list |
F4 |
Return to the topic picker |
F5 |
Show the local Python reference |
O |
Open official docs from the reference window |
Esc |
Close docs, or quit from main screens |
Ctrl+Q |
Quit |
Project Layout
pylings/ # application package
core/ # manifest, state, runner, reset, docs loading
screens/ # Textual screens
widgets/ # reusable TUI widgets
docs/ # bundled Python documentation snippets
pylings/curriculum/ # packaged copy in built wheels
exercises/<topic>/ # learner-editable exercise files
checks/<topic>/ # hidden assertions for each exercise
tests/ # unit, integration, and TUI tests
scripts/fetch_python_docs.py
info.toml # curriculum order, hints, and docs URLs
Regenerate the local reference snippets with:
python scripts/fetch_python_docs.py
Development
pip install -e ".[dev]"
python -m pytest -q
pylings --root tests/fixtures/passing_curriculum verify
When adding curriculum, update exercises/, checks/, and info.toml
together. Keep exercise and check filenames mirrored, for example
exercises/lists/lists3.py and checks/lists/lists3.py.
Release Flow
Pylings uses Semantic Versioning:
MAJOR: incompatible curriculum or CLI changes.MINOR: new topics, exercises, TUI features, or docs workflows.PATCH: fixes, copy edits, and compatible test or packaging updates.
Branch flow is feature-first:
feature/<name> -> dev -> main -> vMAJOR.MINOR.PATCH
Feature branches are merged into dev. A verified dev branch is then merged
into main and tagged with an annotated release tag such as v0.1.0.
See RELEASE.md for the release checklist.
Attribution
Pylings is inspired by rustlings. Bundled reference snippets are generated from the official Python documentation. See pylings/docs/NOTICE.md for Python documentation licensing details.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_learnings-0.2.0.tar.gz.
File metadata
- Download URL: python_learnings-0.2.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b9a4a2be83541d78c34a7c88e078fab0169661944402965112b8f47a3a0e2e9
|
|
| MD5 |
8f3287db3c59248ffc908ce39b33f6f2
|
|
| BLAKE2b-256 |
8de25cc63533952b372ab14b55af78c2ac8d4ae537b520dcb2c5835cfd8f339c
|
Provenance
The following attestation bundles were made for python_learnings-0.2.0.tar.gz:
Publisher:
publish.yml on abhiksark/pylings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_learnings-0.2.0.tar.gz -
Subject digest:
4b9a4a2be83541d78c34a7c88e078fab0169661944402965112b8f47a3a0e2e9 - Sigstore transparency entry: 1675168997
- Sigstore integration time:
-
Permalink:
abhiksark/pylings@e08c5f2dd1c9cfdb0d5ff814ad2b3f4331035dae -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/abhiksark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e08c5f2dd1c9cfdb0d5ff814ad2b3f4331035dae -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_learnings-0.2.0-py3-none-any.whl.
File metadata
- Download URL: python_learnings-0.2.0-py3-none-any.whl
- Upload date:
- Size: 384.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16ffbd3a7fa30e4565ce4f4472d27bacb84411807b5a645cd803b007a1445d8f
|
|
| MD5 |
c6333fb1a5fac866b4f6f1f9d0f7f74b
|
|
| BLAKE2b-256 |
21f950d81db40b5055b2e1ffe9246487b5aab167ee77ae4bdbeb7ab3410e3e20
|
Provenance
The following attestation bundles were made for python_learnings-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on abhiksark/pylings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_learnings-0.2.0-py3-none-any.whl -
Subject digest:
16ffbd3a7fa30e4565ce4f4472d27bacb84411807b5a645cd803b007a1445d8f - Sigstore transparency entry: 1675169004
- Sigstore integration time:
-
Permalink:
abhiksark/pylings@e08c5f2dd1c9cfdb0d5ff814ad2b3f4331035dae -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/abhiksark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e08c5f2dd1c9cfdb0d5ff814ad2b3f4331035dae -
Trigger Event:
release
-
Statement type: