Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Please install PythMC instead! It's a more complete, intuitive, and clean library, succeeding PyMChat and MESL.

PyMChat

A Simple and easy-to-use Python Library to read and interact with Minecraft's Chat in real time.

Installation

pip install pymchat

Usage

Reading chat messages

from pymchat.chat import Chat

chat = Chat()

# Limit in get_history is defaulted to 100.
message_list = chat.get_history(limit=10)

for message in message_list:
  print(message.content)

This sample output was taken from a real server.

[+] JohnRockefailure has joined
[+] Senseimasterman9 has joined
Welcome | Steve | Senseimasterman9 to the server!
<| Investor | *Blist> Welcom
<| Griffin | *Jay> W e l c o m e ! E n j o y y o u r s t a y a t S a f e S u r v i v a l
<| Event Staff | *Enelis> o-o
<| Griffin | *Jay> oof
<| Veteran | Parkemon20000> thats... not normal
[-] JohnRockefailure has left
<| Phoenix | *Kelp> Gn all

Sending chat messages

from pymchat.chat import Chat

chat = Chat()
message_list = chat.send("This is a sample message!")

Using this method will briefly attempt to locate a Minecraft Window, open the chat, send the message, and then switch back to the previous active window. A MinecraftWindowNotFoundError will be thrown if a Minecraft Window isn't found.

Message Objects

Properties:

content

id

date

Content Property: Holds the content of a message. It represents exactly what the user sees, without colours.

ID Property: An unique number for the message, for the current session. This helps distinguishing between messages effectively.

Date Property: The date of when the message was sent. It follows the format from the latest.log file's date.

Chat Object

Properties:

default_logs_path

chat_key

window_name

Methods:

get_history | Limit defaulted to 100, gets the chat messages history

send | Sends a message to the chat.

Default_Logs_Path Property: Can be altered, defines the location of the latest.log file. Defaults to \.minecraft\logs\latest.log

Chat_Key Property: Can be altered, defines the key that triggers the text chat on minecraft. Defaults to 'T'.

Window_Name: Can be altered, defines the title of the window that the Minecraft Client launches as. Defaults to "Minecraft"

Metadata

Release files for pymchat 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 pymchat 1.0
File Size Uploaded Provenance
pymchat-1.0.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 34.2 kB

Release files / pymchat-1.0.tar.gz

Download URL pymchat-1.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f20668cc2582f0c6565916cab2909fed730e251a63c1bbafa1c86b137795048
BLAKE2b-256 checksum
How to use checksums
7ad85d25ddec96a97d17cd853379be8a2557fb9ef6ca2dca4be758896a374533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / pymchat-1.0-py3-none-any.whl

Download URL pymchat-1.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8106a5752b00789c56a98099a1886d310e788f7cbd87510b5ab6668c1812274
BLAKE2b-256 checksum
How to use checksums
1e1db6d792052cd403328459d17e5daed2be2e43b0b7224a6bb5673d2a79e3e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Security for pymchat 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.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

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