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.

Source Distribution

concur-0.3.0.tar.gz (14.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page