Skip to main content

PyPI Python package PyPI - License

cuia 🧉

cuia

A delightful tiny framework for building reliable text-based applications.

cuia is a tiny Python library for building interactive terminal user interfaces that are easy to use, fast and have a small memory footprint.

cuia is inspired by Bubble Tea (written in Go) and, in particular, employs the Elm architecture (TEA, named after the Elm programming language). This means that cuia applications are as dynamic and easy to write (and use) as they could be.

Features

  • 🧵 Simple: your user interface is a string of characters
  • 💬 Interaction-focused
  • ♻️ Easily integrate with other libraries
  • 🕹️ Use the same escape code sequences as you would with Colorama
  • 🖥️ Support for Unix variants out of the box: curses under the hood by default (and probably works on Windows and DOS if a compatible curses library is available)
  • 🤬 Only one dependency: cusser (for wrapping the curses library)
  • 🐍 Python 3.8+

Installation

$ pip install cuia

Usage

In [1]: import asyncio

In [2]: from dataclasses import dataclass

In [3]: from cuia import Program, Store

In [4]: @dataclass
   ...: class Hello(Store):
   ...:
   ...:     x: int = 0
   ...:     y: int = 0
   ...:
   ...:     def __str__(self):
   ...:         return f"\033[{self.x};{self.y}H\033[1mHello, 🌍!"
   ...:

In [5]: program = Program(Hello(34, 12))

In [6]: asyncio.run(program.start())

Screenshot

Metadata

Release files for cuia 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cuia 0.1.1
File Size Uploaded Provenance Actions
cuia-0.1.1.tar.gz 11.2 kB Without provenance Details for cuia-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cuia 0.1.1
File Interpreter ABI Platform Actions
cuia-0.1.1-py3-none-any.whl Python 3 none any Details for cuia-0.1.1-py3-none-any.whl

Total release size: 24.3 kB

Release files / cuia-0.1.1.tar.gz

Download URL cuia-0.1.1.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c83a6eb3bdb308abbab82a92abeb417af9fe5416acadf45f4723b0da63b46402
BLAKE2b-256 checksum
How to use checksums
9bb5cdde8e6baabe381da761e75e5504ae0ffeb6b3b71f427b61c8cb8d303ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic

Release files / cuia-0.1.1-py3-none-any.whl

Download URL cuia-0.1.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
487a7f57e44f94a95ca4ace9c4e4abbe7339bb92ce74f98de04ac5d793d4d6cd
BLAKE2b-256 checksum
How to use checksums
36267621de36c066dca400fbe59c5ef15218d0d77090dc5b81c3c263a51a2d55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic

Security for cuia 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page