Skip to main content

Concur UI Framework for Python

Project description

Python Concur

Documentation

Examples

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for concur, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size concur-0.1.3-py3-none-any.whl (18.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size concur-0.1.3.tar.gz (13.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page