Back to browse
CoshUI – A backend-agnostic UI engine for Python game development

CoshUI – A backend-agnostic UI engine for Python game development

by jylefv·Jun 20, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainShip It

React-like state reconciliation in immediate-mode UI with backend swapping via one parameter.

Strengths
  • Backend-agnostic design lets same UI code render across four different frameworks
  • Context manager API provides declarative feel familiar to HTML/CSS developers
  • Tween animation system and signal-based events built into core library
Weaknesses
  • Only 2 months old with 54 commits - needs more maturity and real-world testing
  • 0 stars on GitLab indicates minimal community adoption so far
Target Audience

Python game developers

Similar To

Dear ImGui · Kivy · Pygame GUI

Post Description

CoshUI is a UI engine that's built to wrap around different game frameworks and easily slot into existing game loops. It is backend-agnostic, meaning the same UI code runs across different frameworks and graphics bindings with minor visual discrepancies.

The current supported backends are Pygame, Raylib, PyOpenGL, and ModernGL, switching backends is a one parameter change (PygameBackend(screen) to RaylibBackend() and etc.) the UI code stays identical.

To note, CoshUI technically acts like an immediate-mode UI library, but it takes a page out of React's book and reconciles state per frame, which lets it function like a retained-mode system.

Its features include: - An API that uses context managers for the "declarative" feel - A built-in interaction system through "signals" - An animation system through tweens - Custom and pre-made themes - Styling Nodes as you want - and more

CoshUI is a project I've been working on for a little less than 2 months, I started it by wanting to research UI systems for another lower-level project I'm working on that eventually grew too big in idea that I just had to publish it.

I would love feedback on not just the code, but also the API design, which was the main reason for this "research".

Reminder that this project is extremely young, I'm a self taught solo developer making all of this (the project and the documentation) in my free time before freshman year of college. There's a lot I probably missed, better and cleaner ways in doing things, and many features that could elevate the project. But it's ultimately learning material, and I would be grateful if you guys gave some thoughts on it.

Repository: https://gitlab.com/jylefv/CoshUI (Primary) https://github.com/JyleFV/CoshUI (Mirror)

Documentation: https://terrarizer03.github.io/coshui-docs (there are unfinished pages)

Installation: [pip install coshui]

Similar Projects

70+ AI Providers Under Same Rust Interface

This brings the Vercel AI SDK ergonomics into Rust with a type-safe LanguageModelRequest builder, #[tool] macros to expose callable tools, streaming text and structured JSON outputs, and compatibility with Vercel UI stacks. The sheer provider count (70+) and ready-made agent tooling are compelling for Rust shops; quality will hinge on per-provider coverage and runtime compatibility, but the docs, examples, and CI indicate serious follow-through.

Niche GemWizardry
usermonksme
104mo ago
Developer Tools●●●Banger

Elah – A browser-native, frame-accurate video editor

Renderer-agnostic core swaps WebGL/Canvas/WebGPU without touching state — rare architectural discipline.

WizardryBig BrainSlick
paulSpaurgen
5410d ago