{"id":13721434,"url":"https://github.com/alex-oleshkevich/starception","last_synced_at":"2025-04-04T13:11:45.846Z","repository":{"id":55430867,"uuid":"523065106","full_name":"alex-oleshkevich/starception","owner":"alex-oleshkevich","description":"Beautiful exception page for Starlette apps.","archived":false,"fork":false,"pushed_at":"2025-03-06T04:14:04.000Z","size":934,"stargazers_count":96,"open_issues_count":3,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T12:05:35.435Z","etag":null,"topics":["debugger","error-handler","exceptions-handling","fastapi","starlette"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/alex-oleshkevich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","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}},"created_at":"2022-08-09T18:26:35.000Z","updated_at":"2025-03-15T05:14:56.000Z","dependencies_parsed_at":"2024-06-20T00:11:17.693Z","dependency_job_id":"581e87df-b1f5-4f23-a06a-ee6d4052d5d2","html_url":"https://github.com/alex-oleshkevich/starception","commit_stats":{"total_commits":104,"total_committers":4,"mean_commits":26.0,"dds":0.04807692307692313,"last_synced_commit":"43b9dd69424a93c9ee1c7de3469ec8bf59df2e46"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-oleshkevich%2Fstarception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-oleshkevich%2Fstarception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-oleshkevich%2Fstarception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-oleshkevich%2Fstarception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-oleshkevich","download_url":"https://codeload.github.com/alex-oleshkevich/starception/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182333,"owners_count":20897379,"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":["debugger","error-handler","exceptions-handling","fastapi","starlette"],"created_at":"2024-08-03T01:01:17.006Z","updated_at":"2025-04-04T13:11:45.829Z","avatar_url":"https://github.com/alex-oleshkevich.png","language":"CSS","funding_links":[],"categories":["CSS","Extensions"],"sub_categories":["Debugging"],"readme":"# Starception\n\nBeautiful exception page for Starlette and FastAPI apps.\n\n![PyPI](https://img.shields.io/pypi/v/starception)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/alex-oleshkevich/starception/lint_and_test.yml?branch=master)\n![GitHub](https://img.shields.io/github/license/alex-oleshkevich/starception)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/starception)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/starception)\n![GitHub Release Date](https://img.shields.io/github/release-date/alex-oleshkevich/starception)\n\n## Installation\n\nInstall `starception` using PIP or poetry:\n\n```bash\npip install starception\n# or\npoetry add starception\n```\n\n### With syntax highlight support\n\nIf you want to colorize code snippets, install `pygments` library.\n\n```bash\npip install starception[pygments]\n# or\npoetry add starception -E pygments\n```\n\n## Screenshot\n\n![image](screenshot.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eDark theme\u003c/summary\u003e\n\u003cdiv\u003e\n    \u003cimg src=\"./dark.png\"\u003e\n\u003c/div\u003e\n\u003c/details\u003e\n\n## Features\n\n* secrets masking\n* solution hints\n* code snippets\n* display request info: query, body, headers, cookies\n* session contents\n* request and app state\n* platform information\n* environment variables\n* syntax highlight\n* open paths in editor (vscode only)\n* exception chains\n* dark theme\n\nStarception automatically masks any value which key contains `key`, `secret`, `token`, `password`.\n\n## Quick start\n\nSee example application in [examples/](examples/) directory of this repository.\n\n## Usage\n\nStarception will work only in debug mode so don't forget to set `Starlette.debug=True`.\n\nTo replace built-in debug exception handler call `install_error_handler` before you create Starlette instance.\n\n```python\nfrom starception import install_error_handler\nfrom starlette.applications import Starlette\n\ninstall_error_handler()\napp = Starlette()\n```\n\n### Integration with other frameworks\n\n`starception` exports `starception.exception_handler(request, exc)` function, which you can use in your\nframework.\nBut keep in mind, Starlette will [not call](https://github.com/encode/starlette/issues/1802) any custom exception\nhandler\nin debug mode (it always uses built-in one).\n\nThe snipped below will not work as you expect (unfortunately).\n\n```python\nfrom starlette.applications import Starlette\n\nfrom starception import exception_handler\n\napp = Starlette(\n    debug=True,\n    exception_handlers={Exception: exception_handler}\n)\n```\n\n## Solution hints\n\nIf exception class has `solution` attribute then its content will be used as a solution hint.\n\n```python\nclass WithHintError(Exception):\n    solution = (\n        'The connection to the database cannot be established. '\n        'Either the database server is down or connection credentials are invalid.'\n    )\n```\n\n![image](hints.png)\n\n## Opening files in editor\n\nSet your current editor to open paths in your editor/IDE.\n\n```python\nfrom starception import set_editor\n\nset_editor('vscode')\n```\n\n![image](link.png)\n\n\n\u003e Note, currently only VSCode supported. If you know how to integrate other editors - please PR\n\n### Registering link templates\n\nIf your editor is not supported, you can add it by calling `add_link_template` and then selecting it with `set_editor`.\n\n```python\nfrom starception import set_editor, add_link_template\n\nadd_link_template('vscode', 'vscode://file/{path}:{lineno}')\nset_editor('vscode')\n```\n\n## Credentials\n\n* Look and feel inspired by [Phoenix Framework](https://www.phoenixframework.org/).\n* Icons by [Tabler Icons](https://tabler-icons.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-oleshkevich%2Fstarception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-oleshkevich%2Fstarception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-oleshkevich%2Fstarception/lists"}