{"id":15631051,"url":"https://github.com/hallerpatrick/frosch","last_synced_at":"2025-04-06T16:14:42.617Z","repository":{"id":37792761,"uuid":"307197788","full_name":"HallerPatrick/frosch","owner":"HallerPatrick","description":"🐸 Debug faster than a frog catches a fly","archived":false,"fork":false,"pushed_at":"2023-01-02T19:06:00.000Z","size":979,"stargazers_count":202,"open_issues_count":11,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T17:15:31.521Z","etag":null,"topics":["debugging","utility","utility-library"],"latest_commit_sha":null,"homepage":"https://hallerpatrick.github.io/frosch/","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/HallerPatrick.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}},"created_at":"2020-10-25T21:38:51.000Z","updated_at":"2025-03-21T09:18:59.000Z","dependencies_parsed_at":"2023-02-01T04:00:45.910Z","dependency_job_id":null,"html_url":"https://github.com/HallerPatrick/frosch","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ffrosch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ffrosch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ffrosch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ffrosch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HallerPatrick","download_url":"https://codeload.github.com/HallerPatrick/frosch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509237,"owners_count":20950232,"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","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":["debugging","utility","utility-library"],"created_at":"2024-10-03T10:38:45.746Z","updated_at":"2025-04-06T16:14:42.591Z","avatar_url":"https://github.com/HallerPatrick.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frosch - Runtime Error Debugger\n\n[![PyPI version](https://badge.fury.io/py/frosch.svg)](https://badge.fury.io/py/frosch)\n![Codecov](https://img.shields.io/codecov/c/github/HallerPatrick/frosch)\n![Pytho_Version](https://img.shields.io/pypi/pyversions/frosch)\n\nBetter runtime error messages\n\nAre you also constantly seeing the runtime error message the\npython interpreter is giving you?\nIt lacks some color and more debug information!\n\n\nGet some good looking error tracebacks and beautifuly formatted\nlast line with all its last values *before* you crashed the program.\n\n\u003ch1 align=\"center\" style=\"padding-left: 20px; padding-right: 20px\"\u003e\n  \u003cimg src=\"resources/showcase.png\"\u003e\n\u003c/h1\u003e\n\n\n## Installation\n\n```bash\n$ pip install frosch\n```\n\n## Usage\n\nCall the hook function at the beginning of your program.\n\n```python\n\nfrom frosch import hook\n\nhook()\n\nx = 3 + \"String\"\n\n```\n\n### Print Exceptions\n\nYou can also easily print your catched exceptions to stdout\n\n```python\n\nfrom frosch import print_exception\n\ntry:\n  x = [0, 1]\n  x[3]\nexcept IndexError as error:\n  print_exception(error)\n\n```\n\n\n# Configuration\n\n## Themes\n\nfrosch allows to use different themes for styling the output:\n\n| Themes   |          |          |               |             |      |\n|----------|----------|----------|---------------|-------------|------|\n| abap     | bw       | igor     | native        | rrt         | trac |\n| algol    | colorful | inkpot   | paraiso_dark  | sas         | vim  |\n| algol_nu | default  | lovelace | paraiso_light | solarized   | vs   |\n| arduino  | emacs    | manni    | pastie        | stata_dark  | xcode |\n| autumn   | friendly | monokai  | perldoc       | stata_light |      |\n| borland  | fruity   | murphy   | rainbow_dash  | tango       |      |\n\nUsage:\n\n```python\nfrom frosch import hook\n\nhook(theme=\"vim\")\n```\n\n### Custom Themes\n\nYou can also define custom themes by by subclassing Style (which is just a thin wrapper\naround pygments styles) and pass it to the hook.\nFor more information please use the [pygments docs](https://pygments.org/docs/styles/#creating-own-styles).\n\n```python\n\nfrom frosch import hook\nfrom frosch.style import Style\nfrom frosch.style.token import Keyword, Name, Comment, String, Error, \\\n     Number, Operator, Generic\n\nclass CustomStyle(Style):\n    default_style = \"\"\n    styles = {\n        Comment:                'italic #888',\n        Keyword:                'bold #005',\n        Name:                   '#f00',\n        Name.Function:          '#0f0',\n        Name.Class:             'bold #0f0',\n        String:                 'bg:#eee #111'\n    }\n\nhook(theme=CustomStyle)\n\n```\n\n## OS Notifications\n\nBut wait there is more!\n\nRunning longer scripts in the background?\n\nJust add a title and/or message to the hook and it will you give a notification when your program\nis crashing.\n\n\n```python\n\nfrom frosch import hook\n\nhook(\n  theme=\"vs\", # VSCode Theme\n  title=\"I crashed!\",\n  message=\"Run Number #1444 is also crashing...\"\n)\n```\n\nThis works on MacOS (`osascript`), Linux (`notify-send`) and Windows (`powershell`).\n\n\n\n# Contribution\n\n`frosch` uses [poetry](https://github.com/python-poetry/poetry) for build and dependency\nmanagement, so please install beforehand.\n\n## Setup\n\n```bash\n$ git clone https://github.com/HallerPatrick/frosch.git\n$ poetry install\n```\n\n## Run tests\n\n```python\n$ python -m pytest tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallerpatrick%2Ffrosch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhallerpatrick%2Ffrosch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallerpatrick%2Ffrosch/lists"}