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 Integration | Layout System |
SVG | |
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(label='Hello'),
Text(label='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-0.0.22-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | add22f88ee3116ce02611e536ed821d7c5484080f372fc8989983fe0e9745bc5 |
|
MD5 | 27f926a1f103bdf484b3d64582805afb |
|
BLAKE2b-256 | c9c92557b1a09808be217d6a7d6bd65465e4a03f1d80b38ee51243db3943e006 |
Hashes for p3ui-0.0.22-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7a90970bb263606b8135c79b70fb4b531b3f51530a75ea2b138327f1a7a388f |
|
MD5 | db5877a46f2140e947bc83cbe2d83148 |
|
BLAKE2b-256 | 5bdcfa32151e68b9a598bbfb033ee3ab179682bf79c128ce1d84086040b098ba |
Hashes for p3ui-0.0.22-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f50cf207eef7c8ca8caa8975d05420e86bf4da6f1fa63214c1f6c0dc95256c99 |
|
MD5 | 64e31998fc3459752d2ab1b04eb1508d |
|
BLAKE2b-256 | bf1c89aea9f407add2d4ed206eb12aac6d1a64c09f84ad6b7e167aa4ee2400d1 |