{"id":13501921,"url":"https://github.com/sloria/flask-konch","last_synced_at":"2025-04-05T01:05:52.574Z","repository":{"id":57430434,"uuid":"60227705","full_name":"sloria/flask-konch","owner":"sloria","description":"An improved shell command for the Flask CLI","archived":false,"fork":false,"pushed_at":"2024-10-07T20:07:02.000Z","size":87,"stargazers_count":69,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-29T15:17:26.652Z","etag":null,"topics":["cli","flask","python","repl","shell"],"latest_commit_sha":null,"homepage":null,"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/sloria.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","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":"2016-06-02T02:54:49.000Z","updated_at":"2024-10-07T20:07:05.000Z","dependencies_parsed_at":"2024-02-12T23:26:13.598Z","dependency_job_id":"e90580d9-2aad-4d0a-8fd8-ff4f29acc2c6","html_url":"https://github.com/sloria/flask-konch","commit_stats":{"total_commits":80,"total_committers":4,"mean_commits":20.0,"dds":"0.36250000000000004","last_synced_commit":"1afe1e0aea376dd656286d68a1eb1b14f2bd1a34"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloria%2Fflask-konch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloria%2Fflask-konch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloria%2Fflask-konch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloria%2Fflask-konch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloria","download_url":"https://codeload.github.com/sloria/flask-konch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271528,"owners_count":20911587,"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":["cli","flask","python","repl","shell"],"created_at":"2024-07-31T22:01:55.354Z","updated_at":"2025-04-05T01:05:52.551Z","avatar_url":"https://github.com/sloria.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"***********\nFlask-Konch\n***********\n\n|pypi-package| |build-status|\n\n.. image:: https://github.com/sloria/flask-konch/assets/2379650/9f6b0518-50d3-422f-af63-17c61f7eb7d8\n    :alt: Flask-Konch screenshot\n\nAn improved shell command for Flask\n===================================\n\nFlask-Konch adds an improved shell command, ``flask konch``, to the `Flask CLI \u003chttp://flask.pocoo.org/docs/0.11/cli/\u003e`_.\n\n\nBenefits of ``flask konch`` over ``flask shell``\n================================================\n\n- Uses IPython, BPython, or ptpython if available, and falls back to built-in interpreter\n- Automatically imports top-level Flask functions and classes by default\n- Define additional variables to include in the shell context\n- Configurable banner and prompt\n\nFlask-Konch uses `konch \u003chttps://github.com/sloria/konch\u003e`_, a shell configuration utility, under the hood.\n\nGet it now\n==========\n::\n\n    pip install flask-konch\n\nUsage\n=====\n\nTo run the shell:\n\n.. code-block:: bash\n\n   export FLASK_APP=path/to/app.py\n   flask konch\n\nTo add additional variables to the shell context:\n\n.. code-block:: python\n\n   app = Flask(__name__)\n   app.config.update({\"KONCH_CONTEXT\": {\"db\": database, \"User\": User}})\n\n\nConfiguration options\n=====================\n\n- ``KONCH_FLASK_IMPORTS``: Whether to automatically import top-level Flask functions and classes. Defaults to ``True``.\n- ``KONCH_FLASK_SHELL_CONTEXT``: Whether to automatically import Flask shell context, as registered by `shell_context_processor(f) \u003chttp://flask.pocoo.org/docs/0.12/api/#flask.Flask.shell_context_processor\u003e`_. Defaults to ``True``.\n- ``KONCH_CONTEXT``: Dictionary of additional variables to include in the shell context.\n- ``KONCH_SHELL``: May be ``'ipy'``, ``'bpy'``, ``'ptpy'``, ``'ptipy'``, ``'py'``, or ``'auto'`` (default).\n- ``KONCH_BANNER``: Custom banner.\n- ``KONCH_PROMPT``: Custom input prompt.\n- ``KONCH_OUTPUT``: Custom output prompt.\n- ``KONCH_CONTEXT_FORMAT``: Format to display shell context. May be ``'full'``, ``'short'``, or a function that receives the context dictionary as input and returns a string.\n- ``KONCH_IPY_AUTORELOAD``: Whether to load and enable the IPython autoreload extension (must be using ``ipython`` shell).\n- ``KONCH_IPY_EXTENSIONS``: List of IPython extension names to load (must be using ``ipython`` shell).\n- ``KONCH_IPY_COLORS``: IPython color style.\n- ``KONCH_IPY_HIGHLIGHTING_STYLE``: IPython code highlighting style.\n- ``KONCH_PTPY_VI_MODE``: Enable vi mode (must be using ``ptpython`` shell).\n\nLicense\n=======\n\nMIT licensed. See the bundled `LICENSE \u003chttps://github.com/sloria/flask-konch/blob/master/LICENSE\u003e`_ file for more details.\n\n.. |pypi-package| image:: https://badgen.net/pypi/v/flask-konch\n    :target: https://pypi.org/project/flask-konch/\n    :alt: Latest PyPI version\n.. |build-status| image:: https://github.com/sloria/flask-konch/actions/workflows/build-release.yml/badge.svg\n    :target: https://github.com/sloria/flask-konch/actions/workflows/build-release.yml\n    :alt: Build status\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloria%2Fflask-konch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloria%2Fflask-konch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloria%2Fflask-konch/lists"}