Package containing basic functions to build telegram bots.
Project description
ethon
• Telegram_ • Github_
install
.. code:: python
pip install ethon
Usage
ethon.pyutils
.. code:: python
from ethon.pyutils import rename, file_extension
#rename files
rename(file, new_path)
#get file extension using path of file
extension = file_extension(file)
ethon.pyfunc
.. code:: python
from ethon.pyfunc import bash, total_frames, video_metadata
#handy subprocess
o, e = bash(cmd)
#get total number of frames in a video
tf = total_frames(file)
#get basic metadata of video
data = video_metadata(file)
height = data["height"]
width = data["width"]
duration = data["duration"]
ethon.uploader
.. code:: python
from ethon.uploader import download_from_youtube, ytdl, weburl
#Download videos from youtube
filename = await download_from_youtube(url)
#Download videos from YtDlp supported sites
filename = await ytdl(url)
#Download files from the web
filename = weburl(url)
.. _Telegram: https://t.me/Tashri2342 .. _Github : https://Github.com/Tashri2342
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
Tashriethon-0.0.2.tar.gz
(21.7 kB
view hashes)
Built Distribution
Close
Hashes for Tashriethon-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9199f93f78e4badcf0d5241071a3cee4c13b4d474cd8c9d9d0234f63591d670 |
|
MD5 | 8543b82636256c51301026f023b010ad |
|
BLAKE2b-256 | 30f5487f16a818d2263917ca442bab9e41d4965d2b85cab28998e54b4f7ac8ef |