Skip to main content

textual-cogs

A collection of Textual dialogs.

Installation

You can install textual-cog using pip:

python -m pip install textual-cog

You also need Textual to run these dialogs.

Example Usage

Here is an example of creating a small application that opens the MessageDialog immediatly. You would normally open the dialog in response to a message or event that has occurred, such as when the application has an error or you need to tell the user something.

from textual.app import App
from textual.app import App, ComposeResult
from textual.widgets import Static

from textual_cogs.dialogs import MessageDialog
from textual_cogs import icons


class DialogApp(App):
    def on_mount(self) -> ComposeResult:
        def my_callback(value: None | bool) -> None:
            self.exit()

        self.push_screen(
            MessageDialog(
                "What is your favorite language?",
                icon=icons.ICON_QUESTION,
                title="Warning",
            ),
            my_callback,
        )


if __name__ == "__main__":
    app = DialogApp()
    app.run()

Metadata

Release files for textual-cogs 0.0.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 textual-cogs 0.0.1
File Size Uploaded
textual_cogs-0.0.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for textual-cogs 0.0.1
File Interpreter ABI Platform
textual_cogs-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / textual_cogs-0.0.1.tar.gz

Download URL textual_cogs-0.0.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a89fbc2d1b1b7afeabad04a68ea8cb2390d4246ad73b704e4d960ad8b36afcd1
BLAKE2b-256 checksum
How to use checksums
27d0ee45a97e7fbf69fd2bcffd02b32c07453a2ae532cf7eafc8dc9e2f32d68a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / textual_cogs-0.0.1-py3-none-any.whl

Download URL textual_cogs-0.0.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0607aec1f8057960ec281dd2c9009baa19b8d1d49dbd1578fa948c7fd5558766
BLAKE2b-256 checksum
How to use checksums
f7800fb2abc4a73b9cbad987b57646aa9689cbe405a932cfa9f9165c4534abe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

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