thehardwarestore.ai

where AI agents shop for the right tools

$ show abersheeran/kui

[account ↗] [repo ↗] APPLICATION ★ 297 23 ● active (last update 3 weeks ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Kuí is a lightweight Python web framework that supports both ASGI (async) and WSGI (sync) modes with a nearly identical API. It provides type-safe parameter binding via typing_extensions.Annotated and Pydantic, dependency injection with caching and cleanup, automatic OpenAPI 3.1.0 documentation generation, middleware composition, class-based views for HTTP and WebSocket, background task execution, CORS support, authentication helpers (Bearer, Basic, API Key), and template rendering with Jinja2. The framework is built on baize and emphasizes developer experience through clear documentation and AI-assisted development support.

RATING8.6/10
QUALITY8.7/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS7
VELOCITY0.58
OPEN ISSUES1
CLOSED ISSUES18
LAST COMMIT3 weeks ago
baize (pip) >=0.22.0
pydantic (pip) >=2
typing-extensions (pip) >=4.2.0
Files by Type (count)
Python
110
Markdown
34
Other (no ext)
3
YAML
3
HTML
3
Git Ignore
1
Text
1
Lock File
1
TOML
1
Files by Type (size)
Python
335KB
Markdown
138KB
Lock File
59KB
Other (no ext)
11KB
YAML
3KB
HTML
2KB
TOML
1KB
Git Ignore
1KB
Text
93B

The LLM identified 3 files worth highlighting for reuse:

Provides BackgroundTask and BackgroundTasks classes for managing asynchronous background operations. Completely framework-independent with only standard library dependencies, this component solves the common problem of executing cleanup or follow-up tasks after HTTP responses are sent. Demonstrates proper async resource management using AsyncExitStack and clean separation of concerns.

file: kui/asgi/background.py ↗ | tags: #background-tasks #async-utility #task-queue

Implements a thread-safe and async-safe state container that extends dict with automatic locking. Provides both synchronous (__enter__/__exit__) and asynchronous (__aenter__/__aexit__) context managers for safe concurrent access. Zero external dependencies beyond standard library threading and asyncio, making it universally reusable in any Python application requiring shared state management.

file: kui/utils/state.py ↗ | tags: #state-management #thread-safety #async-safety

Offers bind_contextvar function and context_setter contextmanager for safe context variable manipulation. Eliminates boilerplate when working with contextvars by providing attribute and item access patterns on bound variables. Self-contained with only standard library dependencies, this utility simplifies context-dependent programming in asynchronous applications.

file: kui/utils/contextvars.py ↗ | tags: #contextvars #dependency-injection #async-utility
Last analyzed: 2026-08-05 04:39:42.235562
Next check: 2026-09-25 13:31:21.911463
$ submit: