Terminal Markup Language (tml)
- A python library to make the output of colored text in the terminal easier and more readable.
Example
from tml import markup
print(markup("<red>this text is <bold>red</bold></red> and the following is <green>green</green>"))
Alternatively, you can use the mprint() function, which is a convenient shortcut.
from tml import mprint
mprint("<red>this text is <bold>red</bold></red> and the following is <green>green</green>")
You don't need to close the tag explicitly if it is not needed.
print(markup("<on-green><blue>this text has blue foreground on green background colors"))
If you would like to print brackets, use them in doubles:
print(markup("<bold>This is <<example>></bold>"))
Available Tags
Foreground
<black><red><green><yellow><blue><magenta><cyan><white><bright-black><light-black><bright-red><light-red><bright-green><light-green><bright-yellow><light-yellow><bright-blue><light-blue><bright-magenta><light-magenta><bright-cyan><light-cyan><bright-white><light-white>
Background
<on-black><on-red><on-green><on-yellow><on-blue><on-magenta><on-cyan><on-white><on-bright-black><on-light-black><on-bright-red><on-light-red><on-bright-green><on-light-green><on-bright-yellow><on-light-yellow><on-bright-blue><on-light-blue><on-bright-magenta><on-light-magenta><on-bright-cyan><on-light-cyan>
Attributes
<bold><b><dark><italic><i><underline><u><blink><reverse><concealed><strike>
Acknowledgement
- This library is inspired by tml
Metadata
Release files for python-tml 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_tml-1.0.2.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_tml-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / python_tml-1.0.2.tar.gz
| Download URL | python_tml-1.0.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3f9b1bc324ad6a8cd2128b215691ada768906192a1f19ebb3e4ebb03874fa67
|
|
BLAKE2b-256 checksum How to use checksums |
e40ef039d151142bceae1409c11ace0b1683752a380a222ee0bc85e38f8cfffc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Release files / python_tml-1.0.2-py3-none-any.whl
| Download URL | python_tml-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f53fa57f154a36a5b0e2740eb081043fe8792e3bbe2434a3c0c478152907121c
|
|
BLAKE2b-256 checksum How to use checksums |
b04879565b58661a1a25c89f4b66ce17044d675c0cc787d46e9b464f50190af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Security for python-tml 1.0.2
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.