napari-script-editor
A python script editor for napari based on haesleinhuepf's fork of PyQode.
This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.
Usage
Start the script editor from the menu Tools > Scripts > Script Editor. Use the auto-completion while typing,
check out the napari tutorials and the
example scripts.
Use the Run button to execute a script.
If you save the script to the folder ".napari-scripts" in your home directory, you will find the script in the
Tools > Scripts menu in napari. You can then also start it from there.
Note: If you have scripts, that might be useful to others, please send them as pull-request to the examples in repository or share them in any other way that suits you.
chatGPT support
In case openAI API is installed, you find another button in the script editor to Ask chatGPT.
Enter a prompt in the script editor and click the button. The script editor will send the prompt to
chatGPT and replace it with the answer. For example try entering:
Write Python code for segmenting an image using these steps:
* Apply a Gaussian blur
* Threshold the image using Otsu's method
* Apply connected component labeling
and it will replace it with code accordingly. If it doesn't work in the first attempt, try again. ChatGPT's answers are not always the same.
Installation
- Get a python environment, e.g. via mini-conda. If you never used python/conda environments before, please follow the instructions here first.
- Install napari using conda.
conda install -c conda-forge napari
Afterwards, install napari-script-editor using pip:
pip install napari-script-editor
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "napari-script-editor" is free and open source software
Known issues
- Sometimes, the script editor thinks, the file has been changed on disk and asks to reload it.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for napari-script-editor 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| napari-script-editor-0.2.10.tar.gz | 10.0 kB | Without provenance | Details for napari-script-editor-0.2.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napari_script_editor-0.2.10-py3-none-any.whl | Python 3 | none | any | Details for napari_script_editor-0.2.10-py3-none-any.whl |
Total release size: 19.4 kB
Release files / napari-script-editor-0.2.10.tar.gz
| Download URL | napari-script-editor-0.2.10.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c89dd6032f7571b549f23fc98ff3b393085c096a966fffebcaade0931de28398
|
|
BLAKE2b-256 checksum How to use checksums |
3fae733372ec381fd0652edfba2af8dec903320b755f1058ebb1ec4ce97767c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / napari_script_editor-0.2.10-py3-none-any.whl
| Download URL | napari_script_editor-0.2.10-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6a200e0a11d5a7c97377af399d871fdba6bbd8973c08e40bc3335e002b8e6aa
|
|
BLAKE2b-256 checksum How to use checksums |
18cf069b67fee7febb79c1692ed54e0b9da7264708e43f0154c5d4b6e7b9cfea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for napari-script-editor 0.2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.