Protocol Buffer package for TMK protocol messages
Project description
tmkproto
مكتبة Protocol Buffer لرسائل بروتوكول TMK
A Protocol Buffer package for TMK protocol messages.
التثبيت / Installation
pip install tmkproto
أو التثبيت من المصدر / Or install from source:
pip install .
الاستخدام / Usage
باللغة العربية
import tmkproto
# إنشاء كائن تسجيل دخول رئيسي
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
login.platform_id = 1
login.client_version = "1.0.0"
# إنشاء رد تسجيل الدخول
login_response = tmkproto.MajorLoginRes()
login_response.account_uid = 123456
login_response.region = "US"
login_response.token = "your_token_here"
# الحصول على بيانات تسجيل الدخول
login_data = tmkproto.GetLoginData()
login_data.AccountUID = 123456
login_data.Region = "US"
login_data.AccountName = "Player1"
# فك تشفير الهمس
whisper = tmkproto.DecodeWhisper()
nested = whisper.Data
nested.uid = 123456
nested.Chat_ID = 789
nested.msg = "Hello!"
# الدردشة المستلمة
chat = tmkproto.recieved_chat()
chat.packet_type = 1
# أمان اللعبة
security = tmkproto.GameSecurity()
security.version = 1
security.hidden_value = 12345
In English
import tmkproto
# Create a major login object
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
login.platform_id = 1
login.client_version = "1.0.0"
# Create login response
login_response = tmkproto.MajorLoginRes()
login_response.account_uid = 123456
login_response.region = "US"
login_response.token = "your_token_here"
# Get login data
login_data = tmkproto.GetLoginData()
login_data.AccountUID = 123456
login_data.Region = "US"
login_data.AccountName = "Player1"
# Decode whisper
whisper = tmkproto.DecodeWhisper()
nested = whisper.Data
nested.uid = 123456
nested.Chat_ID = 789
nested.msg = "Hello!"
# Received chat
chat = tmkproto.recieved_chat()
chat.packet_type = 1
# Game security
security = tmkproto.GameSecurity()
security.version = 1
security.hidden_value = 12345
الفئات المتاحة / Available Classes
MajorLogin- رسالة تسجيل الدخول الرئيسية / Main login messageMajorLoginRes- رد تسجيل الدخول / Login responseGetLoginData- الحصول على بيانات تسجيل الدخول / Get login dataDecodeWhisper- فك تشفير الهمس / Decode whisper messagerecieved_chat- الدردشة المستلمة / Received chat messageGameSecurity- أمان اللعبة / Game security
التسلسل وإلغاء التسلسل / Serialization and Deserialization
import tmkproto
# إنشاء وتسلسل / Create and serialize
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
serialized_data = login.SerializeToString()
# إلغاء التسلسل / Deserialize
new_login = tmkproto.MajorLogin()
new_login.ParseFromString(serialized_data)
print(new_login.game_name) # Output: MyGame
المتطلبات / Requirements
- Python >= 3.7
- protobuf >= 3.20.0
الترخيص / License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tmkproto-1.0.0.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tmkproto-1.0.0.tar.gz.
File metadata
- Download URL: tmkproto-1.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da5200c5219ac010766a9abe0de6d163cd954e938f15bf434b15541c8b1ea85
|
|
| MD5 |
4c6048780e968a4bdbdca389df48b2fe
|
|
| BLAKE2b-256 |
aa34e9aeb659f74bf1cefca3445e8a31bd278742fd2f04b61428ea7a8fd95de5
|
File details
Details for the file tmkproto-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tmkproto-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a6f48084a03959c4c86c6c150c46fc9eb73f03c75ec05ab1bf9c334bc04acf
|
|
| MD5 |
102311c4b67fbd1650b82b13800c0c28
|
|
| BLAKE2b-256 |
722e99b9d74ee49365e567f4a3eb0fccd7703c0b6ead950a0316afe895e75c98
|