Concur UI Framework for Python
Project description
Python Concur
Concur is a Python UI framework based on synchronous generators.
It is a port of Concur for Haskell and Concur for Purescript.
Concur can be thought of as a layer on top of PyImGui, which is a set of bindings to the Dear ImGui UI library. It helps you to get rid of unprincipled code with mutable state, and lets you build structured and composable abstractions.
A discussion of Concur concepts can also be found in the Documentation for the Haskell/Purescript versions. This obviously uses Haskell/Purescript syntax and semantics, but many of the concepts will apply to the Python version.
Being an abstraction over ImGui, Concur is best used for debugging, prototyping and data analysis, rather than user-facing applications.
Installation
Concur is available on PyPI and can be installed using pip:
pip install concur
This Python code should now produce a very simple UI:
import concur as c
c.integrations.main("Hello World", c.button("Close"), 500, 500)
Use any of the examples as a starting point for your app.
Optionally, replace PyImGui with a forked version. It contains several functions that are missing from upstream. Without those, some more experimental functionality in Concur may be missing and/or buggy (graph plotting).
pip install git+https://github.com/potocpav/pyimgui.git
For Concur development, clone the repo and install it using pip:
git clone https://github.com/potocpav/python-concur.git
cd python-concur
pip install -e.
examples/all.py # Run the examples to verify installation
To build documentation, install pdoc3 (pip install pdoc3
) and run the script ./mkdocs.sh
.
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.