Skip to main content

Textura

Textura is a Python package for terminal text styling, similar to colorama, but with more features and flexibility. With Textura, you can easily add foreground colors, background colors, and text styles (bold, italic, underline) to your terminal output.

Installation

You can install Textura using pip:

pip install textura

Usage

Here is an example usage

import textura
from textura import Fore, Back, Style, txtra_print, txtra_format, option, colors_list, PrintError

# Set options (reset text at end, and prevent styled text in print())
option(resetend=True, strict=True)

# Display available colors and styles
print("Available styles and colors:")
colors_list()

print("\n--- Styled Print Examples ---\n")

# Foreground color example
txtra_print("{Fore.GREEN}Green text")

# Background color example
txtra_print("{Back.YELLOW}{Fore.BLACK}Black on yellow")

# Style example
txtra_print("{Style.BOLD}Bold text")
txtra_print("{Style.UNDERLINE}Underlined text")
txtra_print("{Style.ITALIC}Italic text")

# Combined styles
txtra_print("{Back.RED}{Fore.WHITE}{Style.BOLD}Bold white on red background")

# Using txtra_format to return a styled string
formatted = txtra_format("{Fore.YELLOW}{Style.UNDERLINE}Underlined Light Blue")
print(formatted)  # This works fine

# Incorrect usage: using styled text directly with print (strict=True will raise PrintError)
try:
    print("{Fore.RED}This should raise an error if strict=True")
except PrintError as e:
    print(f"Caught PrintError: {e}")

Metadata

Release files for textura 1.1.0

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

Source distribution (sdist)

Source distribution for textura 1.1.0
File Size Uploaded Provenance Actions
textura-1.1.0.tar.gz 3.9 kB Without provenance Details for textura-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.1 kB

Release files / textura-1.1.0.tar.gz

Download URL textura-1.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
79e90df6e4093351888f4c7621367c20d8d54915601af86b4318f2a75cdb19da
BLAKE2b-256 checksum
How to use checksums
50e4b42b1656dfb8fdf96494cf3c3b498b1687e50646781d7f4aefe6d0056eca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / textura-1.1.0-py3-none-any.whl

Download URL textura-1.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f69a653644b16a052045c08a82bfcf1ed172b0f71d6fbad0df25f5d3464870f
BLAKE2b-256 checksum
How to use checksums
b73431115aa718d23f01e9268c7dece99e5629d20c77d94d7d585b58f33e3bb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for textura 1.1.0

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