Async Python User Interface Library
Project description
(C++) Python User Interface Library
This project aims at fast prototyping and development of graphical applications. It combines Dear ImGui, Skia python binding and related projects like ImPlot in a C++ wrapper. This wrapper can be used from within Python though Pybind11.
ImGui Elements | Matplotlib Integration |
---|---|
ImPlot | Flexible |
SVG | Image Viewer |
Installation
pip install p3ui
Hello World!
#
# run, Window, Text, Row, Justification, Alignment, em ..
from p3ui import *
async def main():
window = Window(title='Hello World!')
window.user_interface.content = Row(
justify_content=Justification.SpaceAround,
align_items=Alignment.Center,
padding=(1 | em, 1 | em),
children=[Text('Hello'), Text('World!')])
await window.closed
run(main())
Note that all elements belong to a single thread. They can only get modified from within this thread. All callbacks and even the renderer will execute in this single thread at the time of writing. Although the event loop does not support all the features of asyncio, it can be utilized to
create
or
schedule
tasks and for multithreading through the
run_in_executor
function. A few code examples are provided which are also linked in the section above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for p3ui-1.0.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb6cbd42bac18df44f3d40a9b1be33ae9abfb85861efe407e7da5bf1a0cadf4 |
|
MD5 | 33acfea9e775b96793b1e575ac6e91e0 |
|
BLAKE2b-256 | 62cbca8e4ecf69bd6694302dafc501acc924aa325ed4283c4b63f60d87123189 |
Hashes for p3ui-1.0.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e77bcdfdd5dad853f75f294e9c7ad527446966d9dc51996ebf1bb32a0ac03221 |
|
MD5 | 32c4770757d2f7d045a3f65e8cdb1eed |
|
BLAKE2b-256 | 035f84d35fa9c1a340c5cc4b3260eb1a9b14be43540d32e3602241acbb680935 |
Hashes for p3ui-1.0.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab5d81058993be225f0ecaf75f3f657ca2a0710f9cfe2b7634a56eb7b0cc255 |
|
MD5 | f5d74b1d3229092f4a5061eefeb92f1a |
|
BLAKE2b-256 | c7ffe97ea58700573bce29e08349eb1c9cab03b764b15fe80f6a276042a73e03 |