Skip to main content

A Rich extension for parsing Minecraft's MiniMessage format

Project description

Minimessagefied-Rich

A Python library that brings Minecraft's MiniMessage format to the Rich library.

Features

  • Parse MiniMessage tags like <red>, <bold>, <click:open_url:'...'>.
  • Custom MiniMessageConsole for automatic string parsing.
  • Support for hex colors and nested styles.
  • Support for the universal closing tag </>.

Usage

Basic Console

from minimessage_rich import MiniMessageConsole

console = MiniMessageConsole()
console.print('<red>Hello <bold>MiniMessage</bold></red>!')

Rich component compatibility

from minimessage_rich import MiniMessageConsole
from minimessage_rich import parse
from rich.table import Table

console = MiniMessageConsole()

table = Table(title="MiniMessage in Tables")
table.add_column("Tag", style="cyan")
table.add_column("Result")
table.add_row("<red>Red</red>", parse("<red>Red</red>"))
table.add_row("<gradient:yellow:red>Fire</>", parse("<gradient:yellow:red>Fire</>"))

console.print(table)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minimessage_rich-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minimessage_rich-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file minimessage_rich-0.1.1.tar.gz.

File metadata

  • Download URL: minimessage_rich-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for minimessage_rich-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3e262e3d317d3afe0c857ef76254f70bb403f072b6891e3e754b0a5cd0af7221
MD5 9c6725f6d1bc445301609bc2dacc6caa
BLAKE2b-256 a1166203087a1df1f48b7eca8ec2e3a364ebe876acbaad6285305bb9c6b7b81c

See more details on using hashes here.

File details

Details for the file minimessage_rich-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for minimessage_rich-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f4bdf562dbfd160da2534d5c73ba63176eea40ef37c6e0a5c596b47e110a198
MD5 6cc4fbb9429fd191c355ad8d836617ff
BLAKE2b-256 e76ed1fd7da1a63b8cee8dd0870625cba3516a9408519f2746608d6881b8518e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page