Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/completementgaga/npgui
This package implements Graphical User Interfaces from a NumPy user perspective.
https://github.com/completementgaga/npgui
graphical-user-interface gui numpy open-source python
Last synced: 16 days ago
JSON representation
This package implements Graphical User Interfaces from a NumPy user perspective.
- Host: GitHub
- URL: https://github.com/completementgaga/npgui
- Owner: completementgaga
- License: mit
- Created: 2023-04-10T23:26:05.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-15T18:41:50.000Z (over 1 year ago)
- Last Synced: 2024-11-13T17:55:14.091Z (3 months ago)
- Topics: graphical-user-interface, gui, numpy, open-source, python
- Language: Python
- Homepage:
- Size: 4.33 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npGUI
This package implements Graphical User Interfaces from a NumPy user
perspective: every image corresponds to an ndarray.The main goal of this package is to provide a
simple way (given certain background and tastes) to build *prototypes* of graphical user interfaces.
In particular, we do not claim for computational performance.---
## Main features
The core class is
ClickableImage whose instances' attributes are:* a dictionary of parameter values,
* a callable that returns an image of fixed shape,
* regions in that shape defined as boolean images of the same shape
* and their corresponding callbacks.When calling the use method of an instance,
the dictionary is passed to the callable, that uses (some of) its values
as arguments and outputs an image which is displayed in a window.Upon clicking on the distinguished regions, their callbacks are called
and alter the parameter values. The image is then refreshed from this
input.When closing the window, the use method returns the dictionary with
its altered values; whence the interaction with the user.These objects can be stacked vertically and horizontally to compose more
complex ones. A certain number of subclasses are proposed as basic
building blocks. The stacked blocks may have parameter keywords in common,
which allows for interactions between them.## Installation
This package can be installed with pip as follows.```
$ pip install np_gui
```To avoid [dependency hell](https://en.wikipedia.org/wiki/Dependency_hell),
you might consider installing this package in a virtual environment.Alternatively, you can check the pyproject.toml file to see if this package is
compatible with your setup ; which is likely.## Documentation
A detailed documentation of this package is available on
[GitHub Pages](https://completementgaga.github.io/npGUI/) --- as a website.It is also available in pdf format
[here](https://github.com/completementgaga/npGUI/blob/master/sphinx/build/latex/npgui.pdf).## Demo
Some demonstration scripts are provided on the [GitHub repository](https://github.com/completementgaga/npGUI).
These are:
* ./demo/puzzles/puzzles.py
| Preview of the puzzles.py demo.|
|:-----------------------------:|
||* ./demo/clock/clock.py
| Preview of the clock.py demo.|
|:-----------------------------:|
||## Further developments of the project
This package could benefit from several enhancements, among other things:
* develop additional specialized subclasses of ClickableImage,
* include keyboard interactions,
* lighten its memory usage.Feel free to open the discussion through issues and pull requests on the [GitHub repository](https://github.com/completementgaga/npGUI).
Feedback is also welcome by e-mail or by giving the project a star.