{"name":"napari-console","display_name":"napari-console","visibility":"public","icon":null,"categories":[],"schema_version":"0.1.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":null,"readers":null,"writers":null,"widgets":null,"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configurations":{}},"package_metadata":{"metadata_version":"2.4","name":"napari-console","version":"0.1.5","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A plugin that adds a console to napari","description":"# napari-console\n\n[![License](https://img.shields.io/pypi/l/napari-console.svg?color=green)](https://github.com/napari/napari-console/raw/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-console.svg?color=green)](https://pypi.org/project/napari-console)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-console.svg?color=green)](https://python.org)\n[![tests](https://github.com/napari/napari-console/workflows/tests/badge.svg)](https://github.com/napari/napari-console/actions)\n[![codecov](https://codecov.io/gh/napari/napari-console/branch/main/graph/badge.svg)](https://codecov.io/gh/napari/napari-console)\n\nA plugin that adds a console to [napari]. This plugin is maintained by the [@napari] team.\n\n`napari-console` adds an interactive console based on IPython to `napari`. The napari UI contains a\n[console button](https://napari.org/dev/getting_started/viewer.html#console-button) to display the\nconsole. This button is enabled if you launch napari from the command line, a script, or use the\nnapari bundled app.\n\n![napari-console in napari UI](https://github.com/napari/docs/blob/main/docs/_static/images/console.png)\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-console\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please file an issue along with a detailed description.\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox]. Please ensure\ntest coverage results remain the same or higher than before you submit a pull request.\n\n## Installation\n\nYou can install `napari-console` via [pip]:\n\n    pip install napari-console\n\n## Local variables and napari-console\n\nIn napari-console 0.0.8 and earlier, the console `locals()` namespace only\ncontained a reference to the napari viewer that enclosed the console.\n\nSince version 0.0.9, it instead contains everything in the enclosing frame that\ncalled napari. That is, if your Python code is:\n\n```python\nimport napari\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nimage = np.random.random((500, 500))\nlabels = ndi.label(image > 0.7)[0]\n\nviewer, image_layer = napari.imshow(image)\nlabels_layer = viewer.add_labels(labels)\n\nnapari.run()\n```\n\nThen the napari console will have the variables `np`, `napari`, `ndi`, `image`,\n`labels`, `viewer`, `image_layer`, and `labels_layer` in its namespace.\n\nThis is implemented by inspecting the Python stack when the console is first\ninstantiated, finding the first frame that is outside of the `napari_console`,\n`napari`, and `in_n_out` modules, and passing the variables in the frame's\n`f_locals` and `f_globals` to the console namespace.\n\nIf you want to disable this behavior (for example, because you are embedding\nnapari and the console within some larger application), add\n`NAPARI_EMBED=1` to your environment variables before instantiating the\nconsole.\n\n[napari]: https://github.com/napari/napari\n[@napari]: https://github.com/napari\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":null,"author_email":"napari team <napari-steering-council@googlegroups.com>","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 4 - Beta","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Programming Language :: Python :: 3.14","Topic :: Software Development :: Testing"],"requires_dist":["IPython>=7.7.0","ipykernel>=7.1","qtconsole!=4.7.6,!=5.4.2,>=4.5.1","qtpy>=1.7.0","PySide6>6.7; extra == \"pyside6\"","PyQt6>6.5; extra == \"pyqt6\"","PyQt6!=6.6.1; platform_system == \"Darwin\" and extra == \"pyqt6\"","napari-console[pyside6]; extra == \"pyside\"","PyQt5!=5.15.0,>=5.13.2; extra == \"pyqt5\"","napari-console[pyqt6]; extra == \"pyqt\"","napari-console[pyqt]; extra == \"qt\"","napari[pyqt]; extra == \"testing\""],"requires_python":">=3.11","requires_external":null,"project_url":["Homepage, https://github.com/napari/napari-console","Bug Tracker, https://github.com/napari/napari-console/issues","Source Code, https://github.com/napari/napari-console"],"provides_extra":["pyside6","pyqt6","pyside","pyqt5","pyqt","qt","testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}