Skip to main content

textual_tagset

A utility to allow selection of choices, either singly or in groups.

To get a flavour of what the package can do, after installation run

python -m textual_tagset.demo

This lets you play with the four object types the tagset package offers choosing the number of items you want to work with. See the Demonstration section below.

The tagset demo utility

Dependency

Besides the usual Python ecosystem the sole requirement is the textual package itself.

For development you will need the poetry command. Installation is normally straightforward.

Installation

textual_tagset is available on PyPI, which will be by far the simplest installation. Simply create a virtual environment (while not strictly necessary this is stringly advised) and with the environment activated issue the command

pip install textual-tagset

I'm very interested in gathering comments. For development feel free to download a copy

git clone git@github.com:holdenweb/textual-tagset.git

if you prefer to use HTTPS:

git clone https://github.com/holdenweb/textual-tagset.git

In either case, change into the directory you just created.

cd textual_tagset

We really do recommend you perform Python development work inside a virtual environment. To create a virtual environment with textual_tagset already installed, first select your Python version. Textual_tagset supports Python 3.9 onwards.

poetry env use 3.11

Then enter

poetry install

To build pip-installable artefacts, run

poetry build

This will create dist/textual_tagset-X.Y.Z.tar.gz and dist/textual_tagset-X.Y.Z-py3-none-any.whl, either of which can be installed with pip.

Usage

A TagSet is a set of string tags. Clicking on a particular tag causes a TagSet.Selected Message to be raised. This has an```indexattribute that contains the numerical index of the selected element, and aselected` attribute containing the selected tag.

A FilteredTagset has the same interface as a TagSet but provides an Input to enter a filter string value to limit the choices visible in the TagSet for ease of selection. Pressing the Enter key the component raises a TagSetSelector.Selected signal whose values attribute holds the tags from the selected set.

The TagSetSelector lets you maintain two TagSets, one showing the the selected tags and the other showing other tags available for selection. Clicking on a tag moves it from one set to the other.

As you might expect there's also a FilteredTagSetSelector, which uses FilteredTagSets for the values. The filtered variants are especially useful when tags must be selected from an intractably large set. In the filtered versions, interaction is terminated by pressing return.

Python API

TagSet and FilteredTagSet have the same API, as do TagSetSelector and FilteredTageSetSelector.

TagSet, FilteredTagSet

TagSetSelector, FilteredTagSetSelector

Documentation to be provided once API is stabilised.

Further development

Development work will aim to increase usability: User comments and issues are both warmly welcome.

Metadata

Release files for textual-tagset 0.3.3

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-tagset 0.3.3
File Size Uploaded Provenance Actions
textual_tagset-0.3.3.tar.gz 7.6 kB Without provenance Details for textual_tagset-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for textual-tagset 0.3.3
File Interpreter ABI Platform Actions
textual_tagset-0.3.3-py3-none-any.whl Python 3 none any Details for textual_tagset-0.3.3-py3-none-any.whl

Total release size: 17.4 kB

Release files / textual_tagset-0.3.3.tar.gz

Download URL textual_tagset-0.3.3.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d63d0d06e8dd5fb726832bbfe300e02842f02c61843a213df0f4c87ab67dd9cf
BLAKE2b-256 checksum
How to use checksums
a9861276fee1b8275526e39bdcffd65a0aa8f9ce0f1062f124f60d32ae69c602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

Release files / textual_tagset-0.3.3-py3-none-any.whl

Download URL textual_tagset-0.3.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
679fca531b690f85b397728dcbbecdbecc0cdcab577d168932a5ffa724b3fdb5
BLAKE2b-256 checksum
How to use checksums
7011cbf13379739b119c02af97123690ffb0cf9022097a58a36daf67d8ce856b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

Security for textual-tagset 0.3.3

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.

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