{"id":51317683,"url":"https://github.com/abhiksark/pythonlings","last_synced_at":"2026-07-01T09:02:49.270Z","repository":{"id":359710152,"uuid":"618924076","full_name":"abhiksark/pythonlings","owner":"abhiksark","description":"Rustlings-style Python exercises in a live terminal TUI with 292 practice tasks and offline Python docs.","archived":false,"fork":false,"pushed_at":"2026-06-18T15:53:31.000Z","size":1974,"stargazers_count":2,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-18T17:24:45.040Z","etag":null,"topics":["beginner-friendly","cli","coding-practice","education","interactive-learning","learn-python","learn-to-code","learning","learning-by-doing","learning-python","pytest","python","python-exercises","rustlings","textual","tui"],"latest_commit_sha":null,"homepage":"http://pylings.abhik.ai/","language":"Python","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/abhiksark.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap/0.3.0.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-03-25T18:36:52.000Z","updated_at":"2026-06-18T15:53:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abhiksark/pythonlings","commit_stats":null,"previous_names":["abhiksark/pylings","abhiksark/pythonlings"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/abhiksark/pythonlings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiksark%2Fpythonlings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiksark%2Fpythonlings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiksark%2Fpythonlings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiksark%2Fpythonlings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhiksark","download_url":"https://codeload.github.com/abhiksark/pythonlings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiksark%2Fpythonlings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34999792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["beginner-friendly","cli","coding-practice","education","interactive-learning","learn-python","learn-to-code","learning","learning-by-doing","learning-python","pytest","python","python-exercises","rustlings","textual","tui"],"created_at":"2026-07-01T09:02:47.938Z","updated_at":"2026-07-01T09:02:49.263Z","avatar_url":"https://github.com/abhiksark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pythonlings\n\n[![PyPI](https://img.shields.io/pypi/v/pythonlings)](https://pypi.org/project/pythonlings/)\n[![Python](https://img.shields.io/pypi/pyversions/pythonlings)](https://pypi.org/project/pythonlings/)\n[![CI](https://github.com/abhiksark/pythonlings/actions/workflows/ci.yml/badge.svg)](https://github.com/abhiksark/pythonlings/actions/workflows/ci.yml)\n[![Downloads](https://img.shields.io/pypi/dm/pythonlings)](https://pypi.org/project/pythonlings/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-yellow)](LICENSE)\n\nDocumentation: [pythonlings.abhik.ai](https://pythonlings.abhik.ai/)\n\n**Rustlings for Python — learn by fixing 292 tiny broken programs in your terminal.**\n\nPythonlings helps you learn Python by fixing small broken programs and watching\nchecks rerun as you type. It is built for beginner Python practice, coding\npractice, and self-paced Python tutorial workflows: 292 exercises, hidden\npytest-style checks, a live Textual editor, progressive hints, and bundled\nPython documentation snippets so learners can work without leaving the terminal.\n\n**Try it in 10 seconds** — zero install, needs [Python 3.9+](https://www.python.org/downloads/)\nand [uv](https://docs.astral.sh/uv/):\n\n```bash\nuvx pythonlings\n```\n\nHow it works: **edit** the broken exercise in the built-in editor → checks\nrerun as you type and advance you to the next one. That's the whole loop.\n\nStatus: `v0.4.0`, alpha — published on PyPI as `pythonlings`.\n\n![Coding screen](docs/assets/screenshots/coding-screen.png)\n\n## Highlights\n\n- 292 Python exercises across 31 topics, from variables through async.\n- Rustlings-inspired learn-by-doing flow for Python coding practice.\n- Live in-terminal editor with automatic checks after edits.\n- Topic picker with progress, resume state, reset, hints, and one-shot CLI runs.\n- `F5` opens a local Python reference window; `O` opens the official docs page.\n- Bundled docs are generated from the official Python documentation for offline use.\n\n## Who It Is For\n\n- Python beginners who want short, focused practice instead of passive reading.\n- Rustlings users who want the same fix-and-verify loop for Python.\n- Learners who prefer working in a terminal with local docs close to the code.\n- Contributors interested in building curriculum, checks, and terminal UX.\n\n## What Happens When You Run It\n\n1. `pythonlings` with no workspace creates a self-contained one at\n   `~/.pythonlings` (override with `PYTHONLINGS_HOME` or `pythonlings init\n   --path \u003cdir\u003e`) and opens the first exercise.\n2. `pythonlings` opens the first pending exercise in the terminal UI.\n3. You edit the broken code, remove `# I AM NOT DONE`, and checks rerun as you\n   work.\n4. Passing checks mark the exercise complete and move progress forward. `F4`\n   opens the topic picker, `F5` opens local docs, and `Esc` quits main screens.\n\n## Install\n\nPythonlings is on PyPI as **`pythonlings`** (it installs the `pythonlings`\ncommand). You need [Python 3.9+](https://www.python.org/downloads/).\n\nRecommended — install it isolated, like any CLI app:\n\n```bash\npipx install pythonlings\n# or\nuv tool install pythonlings\n```\n\nOr run it with no install at all:\n\n```bash\nuvx pythonlings\n```\n\nOr plain pip (use a virtual environment):\n\n```bash\npip install pythonlings\n```\n\n\u003e Pythonlings was previously published as `python-learnings`. The package\n\u003e `pylings` on PyPI is an unrelated project — install `pythonlings`.\n\nFor the latest development build from `main`:\n\n```bash\npipx install --force \"git+https://github.com/abhiksark/pythonlings.git\"\n```\n\nCreate a learner workspace before starting:\n\n```bash\npythonlings init --path ~/pythonlings-workspace\ncd ~/pythonlings-workspace\npythonlings\n```\n\nFor local development:\n\n```bash\ngit clone git@github.com:abhiksark/pythonlings.git\ncd pythonlings\npip install -e \".[dev]\"\n```\n\n## Quick Start\n\n```bash\npythonlings init --path ./learn-python     # create a self-contained workspace\ncd learn-python\npythonlings                              # open the TUI on the first pending exercise\npythonlings topics                       # open the topic picker\npythonlings list                         # show topic progress\npythonlings hint variables1              # print a hint and docs link\npythonlings run variables1               # run one exercise check\npythonlings dry-run variables1           # run one exercise non-interactively\npythonlings reset variables1 --yes       # restore an exercise from its original\npythonlings update                       # refresh checks/docs after upgrading pythonlings\n```\n\nEach exercise contains a `# I AM NOT DONE` marker. Fix the code, remove the\nmarker, and let the live check advance you to the next exercise.\n\n## Demo\n\n![Pythonlings terminal demo](docs/assets/demos/pythonlings-demo.gif)\n\nThe demo is generated from [docs/demo.tape](docs/demo.tape). See\n[docs/DEMO_GIF.md](docs/DEMO_GIF.md) to regenerate it with\n[VHS](https://github.com/charmbracelet/vhs). It covers the first-run flow,\nprogress listing, hints, the coding screen, local docs, topic picker, and quit\npath.\n\n## Interface\n\n![Topic picker](docs/assets/screenshots/topic-picker.png)\n\n| Key | Action |\n|---|---|\n| `F1` | Toggle hint |\n| `F2` | Reset the current exercise |\n| `F3` | Toggle the exercise list |\n| `F4` | Return to the topic picker |\n| `F5` | Show the local Python reference |\n| `O` | Open official docs from the reference window |\n| `Esc` | Close docs, or quit from main screens |\n| `Ctrl+Q` | Quit |\n\n![Local docs reference](docs/assets/screenshots/docs-reference.png)\n\n## Project Layout\n\n```text\npythonlings/                 # application package\n  core/                  # manifest, state, runner, reset, docs loading\n  screens/               # Textual screens\n  widgets/               # reusable TUI widgets\n  docs/                  # bundled Python documentation snippets\npythonlings/curriculum/      # packaged copy in built wheels\nexercises/\u003ctopic\u003e/       # learner-editable exercise files\nchecks/\u003ctopic\u003e/          # hidden assertions for each exercise\ntests/                   # unit, integration, and TUI tests\nscripts/fetch_python_docs.py\ninfo.toml                # curriculum order, hints, and docs URLs\n```\n\nRegenerate the local reference snippets with:\n\n```bash\npython scripts/fetch_python_docs.py\n```\n\n## Development\n\n```bash\npip install -e \".[dev]\"\npython -m pytest -q\npythonlings --root tests/fixtures/passing_curriculum verify\n```\n\nWhen adding curriculum, update `exercises/`, `checks/`, and `info.toml`\ntogether. Keep exercise and check filenames mirrored, for example\n`exercises/lists/lists3.py` and `checks/lists/lists3.py`.\n\n## Contributing\n\nPythonlings is actively developed and welcomes contributors — beginners included.\nThe current focus is the [0.3.0 roadmap](docs/roadmap/0.3.0.md) (wider adoption),\nand every roadmap issue is written to be picked up cold. Start with a\n[`good first issue`](https://github.com/abhiksark/pythonlings/issues?q=is%3Aopen+label%3A%22good+first+issue%22),\ncomment to claim it, and see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Release Flow\n\nPythonlings uses Semantic Versioning:\n\n- `MAJOR`: incompatible curriculum or CLI changes.\n- `MINOR`: new topics, exercises, TUI features, or docs workflows.\n- `PATCH`: fixes, copy edits, and compatible test or packaging updates.\n\nBranch flow is feature-first:\n\n```text\nfeature/\u003cname\u003e -\u003e dev -\u003e main -\u003e vMAJOR.MINOR.PATCH\n```\n\nFeature branches are merged into `dev`. A verified `dev` branch is then merged\ninto `main` and tagged with an annotated release tag such as `v0.1.0`.\nSee [RELEASE.md](RELEASE.md) for the release checklist.\n\n## Attribution\n\nPythonlings is inspired by [rustlings](https://github.com/rust-lang/rustlings).\nBundled reference snippets are generated from the official Python documentation.\nSee [pythonlings/docs/NOTICE.md](pythonlings/docs/NOTICE.md) for Python documentation\nlicensing details.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiksark%2Fpythonlings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhiksark%2Fpythonlings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiksark%2Fpythonlings/lists"}