{"id":31721247,"url":"https://github.com/parmeetbhamrah/whiffpy","last_synced_at":"2025-10-09T03:45:32.452Z","repository":{"id":317752891,"uuid":"1020397710","full_name":"ParmeetBhamrah/whiffpy","owner":"ParmeetBhamrah","description":"Smart Python code explainer \u0026 error analyzer for beginners and educators.","archived":false,"fork":false,"pushed_at":"2025-10-02T21:02:18.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T21:21:06.634Z","etag":null,"topics":["ast","error","explainer","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/whiffpy/","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/ParmeetBhamrah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-15T20:02:47.000Z","updated_at":"2025-10-02T21:02:21.000Z","dependencies_parsed_at":"2025-10-02T21:21:09.026Z","dependency_job_id":"bffa8d96-6ea4-4c73-8e6c-85547affa701","html_url":"https://github.com/ParmeetBhamrah/whiffpy","commit_stats":null,"previous_names":["parmeetbhamrah/whiffpy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ParmeetBhamrah/whiffpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParmeetBhamrah%2Fwhiffpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParmeetBhamrah%2Fwhiffpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParmeetBhamrah%2Fwhiffpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParmeetBhamrah%2Fwhiffpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParmeetBhamrah","download_url":"https://codeload.github.com/ParmeetBhamrah/whiffpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParmeetBhamrah%2Fwhiffpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000706,"owners_count":26082911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["ast","error","explainer","python"],"created_at":"2025-10-09T03:45:31.370Z","updated_at":"2025-10-09T03:45:32.441Z","avatar_url":"https://github.com/ParmeetBhamrah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/whiffpy.svg)](https://pypi.org/project/whiffpy/)\n\n# WhiffPy 🐍💨  \n**WhiffPy** is a smart Python code explainer and error analyzer designed for beginners, educators, and anyone who wants to understand Python code more deeply. It analyzes code, explains its structure in plain English, and provides actionable, friendly error messages.\n\n---\n\n## 🚀 Features\n- Beginner-friendly explanations of code structure using **Python's AST**  \n- Human-readable **error analysis with suggestions** for common mistakes  \n- **Safe code execution** with output and error capture  \n- Flexible **CLI**: analyze files or code snippets, output as text or JSON, save results  \n- Easy to extend: add new error hints or code patterns  \n\n---\n\n## 📦 Installation  \n\n### Using pip (recommended for general usage)\n\nWhiffPy **v0.1.2** is available on PyPI. You can install it directly with:\n\n```sh\npip install whiffpy\n````\n\nAfter installation, run the CLI commands:\n\n```sh\nwhiffpy path/to/file.py\n```\n\n### Using Poetry (for development)\n\nEnsure you have **Python 3.9+** and [Poetry](https://python-poetry.org/) installed.\n\n```sh\n# Clone the repository and install dependencies\ngit clone https://github.com/ParmeetBhamrah/whiffpy.git\ngit clone https://github.com/ParmeetBhamrah/whiffpy.git\ncd whiffpy\npoetry install\n```\n\n---\n\n## 🛠️ Usage\n\n### Command Line Interface\n\nAnalyze a Python file:\n\n```sh\nwhiffpy path/to/file.py\n```\n\nAnalyze a code snippet directly:\n\n```sh\nwhiffpy --code \"print(1+1)\"\n```\n\nExplain code structure only (no execution):\n\n```sh\nwhiffpy path/to/file.py --explain-only\n```\n\nOutput as JSON:\n\n```sh\nwhiffpy path/to/file.py --json\n```\n\nSave output to a file:\n\n```sh\nwhiffpy path/to/file.py --save result.txt\n```\n\n### Python API\n\n```python\nfrom whiffpy import analyze\n\ncode = \"x = 1 / 0\"\nreport = analyze(code)\nprint(report)\n```\n\n---\n\n## 📁 Examples\n\nCheck the [`examples/`](examples) directory for demos:\n\n* **examples/demo.py** → Basic code execution and error capture\n* **examples/demo_analyze.py** → Full analysis with explanations\n\n---\n\n## 🧩 Development Notes\n\n* **Add error hints** → edit `whiffpy/utils.py`\n* **Extend code explanations** → edit `whiffpy/explainer.py`\n\n---\n\n## 📂 Project Structure\n\n```\nwhiffpy/\n│── __init__.py        # Main API (analyze)\n│── cli.py             # Command-line interface\n│── runner.py          # Code execution\n│── explainer.py       # AST-based code explanations\n│── error_analyzer.py  # Traceback parsing and suggestions\n│── utils.py           # Error hints and result formatting\nexamples/              # Usage examples\nREADME.md\npyproject.toml\npoetry.lock\nLICENSE\n```\n\n---\n\n## 📄 License\n\nWhiffPy is released under the **MIT License**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparmeetbhamrah%2Fwhiffpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparmeetbhamrah%2Fwhiffpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparmeetbhamrah%2Fwhiffpy/lists"}