Python package for telegram bots and sub tool for pyrogram
Project description
PyLeaves2
🌿 telegram bot's python pypi package & tools for pyrogram
⚠️ Must install
These requirements must be installed in your repo
- pyrogram
- tgcrypto
Current featur ⚡️
progress_for_pyrogram():
This is async function of ( Download | Upload ) progress bar with simple way to use
Example
# import time.time and other
from pyleaves2 import Leaves # must import
PROGRESS_BAR = """
percentage: {percentage} | {current}
total completed: {total}%
current speed: {speed}/s
estimate time: {est_time} """
Button = InlineKeyboardMarkup([[InlineKeyboardButton('text', callback_data="data")]])
start_time = time()
editable_text = await app.send_message(chat_id, "download started")
# download media
await app.download_media(
message,
progress=Leaves.progress_for_pyrogram,
progress_args=(
"try to download......", # 1. must be a string
editable_text, # 2. editable message
start_time # 3. time.time() import time.time & time()
PROGRESS_BAR, # 4. progress template check more description
'▣', # 5. string character for identifie the finished percentage
'▢', # 6. string character for identifie the unfinished percentage
Button, # 7. pyrogram replay_markup
)
)
# ⚠️ don't use parameters keyword & must keep this Oder
formats of template
{current}= process completed file size{total}= total file size{percentage}= total completed percentage{speed}= current speed in byte/second{est_time}= estimated time
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
pyleaves2-1.0.2.tar.gz
(16.0 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
PyLeaves2-1.0.2-py3-none-any.whl
(17.5 kB
view details)
File details
Details for the file pyleaves2-1.0.2.tar.gz.
File metadata
- Download URL: pyleaves2-1.0.2.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f33d2bba789575606f21e9a6481824c1a4e987f343820b3a4164aad717954f3c
|
|
| MD5 |
a8b83c2cfc2b850daed7ac4fb30cf2d3
|
|
| BLAKE2b-256 |
fc4421fbd97b28a233aa9490b5a9de13af8414d1c994dbe0e80fd02f85c46aee
|
File details
Details for the file PyLeaves2-1.0.2-py3-none-any.whl.
File metadata
- Download URL: PyLeaves2-1.0.2-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7058de302ec80ff0854a68dbf44466dccece136e5972aa4406bb9d4735c9a89
|
|
| MD5 |
2efdf0da09fbca9606035cbd6d2f9b19
|
|
| BLAKE2b-256 |
94345514b3411574def638c92c08f25c0bd515a5aac83a5150cff7a65d8d4052
|