telethon

Pure Python 3 MTProto API Telegram client library, for bots too!

https://github.com/lonamiwebs/telethon

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 162 committers (0.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary

Keywords

hacktoberfest library mtproto python-library telegram telegram-api telethon

Keywords from Contributors

asyncio aiohttp http-client http-server pyrogram parsing apps templates views
Last synced: 6 months ago · JSON representation

Repository

Pure Python 3 MTProto API Telegram client library, for bots too!

Basic Info
  • Host: GitHub
  • Owner: LonamiWebs
  • License: mit
  • Language: Python
  • Default Branch: v1
  • Homepage: https://docs.telethon.dev
  • Size: 9.29 MB
Statistics
  • Stars: 11,226
  • Watchers: 157
  • Forks: 1,536
  • Open Issues: 104
  • Releases: 40
Topics
hacktoberfest library mtproto python-library telegram telegram-api telethon
Created over 9 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.rst

Telethon
========
.. epigraph::

  ⭐️ Thanks **everyone** who has starred the project, it means a lot!

|logo| **Telethon** is an asyncio_ **Python 3**
MTProto_ library to interact with Telegram_'s API
as a user or through a bot account (bot API alternative).

.. important::

    If you have code using Telethon before its 1.0 version, you must
    read `Compatibility and Convenience`_ to learn how to migrate.
    As with any third-party library for Telegram, be careful not to
    break `Telegram's ToS`_ or `Telegram can ban the account`_.

What is this?
-------------

Telegram is a popular messaging application. This library is meant
to make it easy for you to write Python programs that can interact
with Telegram. Think of it as a wrapper that has already done the
heavy job for you, so you can focus on developing an application.


Installing
----------

.. code-block:: sh

  pip3 install telethon


Creating a client
-----------------

.. code-block:: python

    from telethon import TelegramClient, events, sync

    # These example values won't work. You must get your own api_id and
    # api_hash from https://my.telegram.org, under API Development.
    api_id = 12345
    api_hash = '0123456789abcdef0123456789abcdef'

    client = TelegramClient('session_name', api_id, api_hash)
    client.start()


Doing stuff
-----------

.. code-block:: python

    print(client.get_me().stringify())

    client.send_message('username', 'Hello! Talking to you from Telethon')
    client.send_file('username', '/home/myself/Pictures/holidays.jpg')

    client.download_profile_photo('me')
    messages = client.get_messages('username')
    messages[0].download_media()

    @client.on(events.NewMessage(pattern='(?i)hi|hello'))
    async def handler(event):
        await event.respond('Hey!')


Next steps
----------

Do you like how Telethon looks? Check out `Read The Docs`_ for a more
in-depth explanation, with examples, troubleshooting issues, and more
useful information.

.. _asyncio: https://docs.python.org/3/library/asyncio.html
.. _MTProto: https://core.telegram.org/mtproto
.. _Telegram: https://telegram.org
.. _Compatibility and Convenience: https://docs.telethon.dev/en/stable/misc/compatibility-and-convenience.html
.. _Telegram's ToS: https://core.telegram.org/api/terms
.. _Telegram can ban the account: https://docs.telethon.dev/en/stable/quick-references/faq.html#my-account-was-deleted-limited-when-using-the-library
.. _Read The Docs: https://docs.telethon.dev

.. |logo| image:: logo.svg
    :width: 24pt
    :height: 24pt

Owner

  • Name: LonamiWebs
  • Login: LonamiWebs
  • Kind: organization
  • Email: totufals@hotmail.com
  • Location: Spain

The place where Lonami does his things. Telegram group over https://t.me/LonamiWebs

GitHub Events

Total
  • Create event: 7
  • Commit comment event: 1
  • Issues event: 174
  • Watch event: 1,280
  • Issue comment event: 338
  • Push event: 68
  • Gollum event: 9
  • Pull request event: 132
  • Pull request review event: 49
  • Pull request review comment event: 44
  • Fork event: 179
Last Year
  • Create event: 7
  • Commit comment event: 1
  • Issues event: 174
  • Watch event: 1,280
  • Issue comment event: 338
  • Push event: 68
  • Gollum event: 9
  • Pull request event: 132
  • Pull request review event: 49
  • Pull request review comment event: 44
  • Fork event: 179

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 2,890
  • Total Committers: 162
  • Avg Commits per committer: 17.84
  • Development Distribution Score (DDS): 0.126
Past Year
  • Commits: 185
  • Committers: 16
  • Avg Commits per committer: 11.563
  • Development Distribution Score (DDS): 0.13
Top Committers
Name Email Commits
Lonami Exo t****s@h****m 2,526
Dmitry D. Chernov b****r@y****u 38
Tulir Asokan t****r@m****t 34
Shrimadhav U K S****e@u****m 11
painor p****a@g****m 11
Jeff j****0@g****m 10
Joscha Götzer j****r@g****m 10
Andrey Egorov a****6@g****m 8
Tanuj e****e@u****m 8
penn5 p****5@u****m 8
Devesh Pal n****0@o****m 6
Anonymous 6****0@u****m 5
NotAFile n****e@g****m 5
painor 3****r@u****m 5
vegeta1k95 3****5@u****m 5
Сергей Прохоров s****r@g****m 4
Kyle2142 1****2@u****m 4
Birger Jarl c****r@g****m 4
Serhii Dylda t****c@g****m 4
Manuel1510 4****0@u****m 4
Hasan J****o@u****m 3
Csaba Henk c****a@l****u 3
Nick80835 n****5@g****m 3
Viktor Oreshkin s****t@g****m 3
Pascal Jürgens t****e@u****m 3
s3mple 4****e@u****m 3
zed i****r@g****m 3
apepenkov 3****v@u****m 3
YouTwitFace c****t@l****m 3
Goblenus G****s@u****m 2
and 132 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 546
  • Total pull requests: 292
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 472
  • Total pull request authors: 88
  • Average comments per issue: 3.9
  • Average comments per pull request: 0.7
  • Merged pull requests: 181
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 130
  • Pull requests: 165
  • Average time to close issues: about 15 hours
  • Average time to close pull requests: 1 day
  • Issue authors: 114
  • Pull request authors: 37
  • Average comments per issue: 0.89
  • Average comments per pull request: 0.44
  • Merged pull requests: 103
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • FreeM1ne (6)
  • o2alexanderfedin (6)
  • Lonami (6)
  • AtlantisDe (5)
  • NotStatilko (4)
  • addreeh (4)
  • MrVolot (3)
  • JM001113 (3)
  • simbadmorehod (3)
  • IamZiroToxic (2)
  • msramalho (2)
  • jw-star (2)
  • Jahongir-Qurbonov (2)
  • Who-X1 (2)
  • theluxury (2)
Pull Request Authors
  • Jahongir-Qurbonov (45)
  • Nick80835 (33)
  • Darskiy (26)
  • apepenkov (8)
  • New-dev0 (7)
  • chirizxc (6)
  • Kacnep89 (6)
  • Aayco (6)
  • 2ei (6)
  • orShadxw (6)
  • ufoptg (5)
  • SpEcHiDe (4)
  • HBcao233 (4)
  • delobanov (4)
  • aeims (4)
Top Labels
Issue Labels
enhancement (127) bug (12) help wanted (4) cleanup (3) RTFM (2) duplicate (2) question (2) invalid (1)
Pull Request Labels

Packages

  • Total packages: 20
  • Total downloads:
    • pypi 1,402,628 last-month
  • Total docker downloads: 203,801
  • Total dependent packages: 109
    (may contain duplicates)
  • Total dependent repositories: 3,839
    (may contain duplicates)
  • Total versions: 589
  • Total maintainers: 12
pypi.org: telethon

Full-featured Telegram client library for Python 3

  • Versions: 237
  • Dependent Packages: 107
  • Dependent Repositories: 3,817
  • Downloads: 1,401,050 Last month
  • Docker Downloads: 203,801
Rankings
Dependent repos count: 0.2%
Downloads: 0.3%
Stargazers count: 0.3%
Dependent packages count: 0.3%
Average: 0.7%
Forks count: 1.2%
Docker downloads count: 2.2%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/LonamiWebs/Telethon
  • Versions: 139
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 4.7%
Average: 7.1%
Dependent packages count: 9.6%
Last synced: 6 months ago
proxy.golang.org: github.com/lonamiwebs/telethon
  • Versions: 136
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: about 1 year ago
pypi.org: telethon-aio

Full-featured Telegram client library for Python 3

  • Versions: 17
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 355 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 4.8%
Average: 10.3%
Dependent repos count: 11.5%
Downloads: 33.7%
Maintainers (1)
Last synced: 6 months ago
pypi.org: newthon

An edited 1.24.0 version of the full-featured Telegram client library for Python 3

  • Versions: 24
  • Dependent Packages: 1
  • Dependent Repositories: 16
  • Downloads: 157 Last month
Rankings
Dependent repos count: 3.6%
Dependent packages count: 4.7%
Downloads: 9.6%
Average: 10.7%
Stargazers count: 16.5%
Forks count: 19.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: c-telethon

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 31 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 7.3%
Average: 12.5%
Dependent repos count: 41.4%
Maintainers (1)
Last synced: 6 months ago
pypi.org: telemdo

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 0
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 4.8%
Dependent repos count: 6.3%
Average: 12.7%
Downloads: 51.0%
Last synced: 10 months ago
pypi.org: teledoge

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 11 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 10.1%
Average: 16.7%
Dependent repos count: 21.5%
Downloads: 50.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: ayiinxd

Full-featured Telegram client library for Python 3

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 234 Last month
Rankings
Dependent packages count: 6.6%
Average: 18.6%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago
pypi.org: telethongoblenustest

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 5 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 10.1%
Average: 18.7%
Dependent repos count: 21.5%
Downloads: 60.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: telethon-repl

Full-featured Telegram client library for Python 3

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 244 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.2%
Dependent packages count: 10.1%
Downloads: 17.4%
Average: 19.2%
Dependent repos count: 67.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: telethon-mod

Full-featured Telegram client library for Python 3

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 422 Last month
Rankings
Dependent packages count: 10.0%
Downloads: 19.0%
Forks count: 19.1%
Average: 19.5%
Dependent repos count: 21.7%
Stargazers count: 27.8%
Maintainers (2)
Last synced: 6 months ago
pypi.org: telethon2

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 93 Last month
Rankings
Stargazers count: 0.8%
Forks count: 1.6%
Dependent packages count: 9.3%
Average: 24.0%
Dependent repos count: 52.5%
Downloads: 55.6%
Last synced: 10 months ago
pypi.org: tashritelethon

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 11 Last month
Rankings
Dependent packages count: 7.2%
Average: 24.3%
Dependent repos count: 41.4%
Maintainers (1)
Last synced: 6 months ago
pypi.org: newthon-fixed

An edited 1.24.0 version of the full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 15 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 18.6%
Forks count: 19.6%
Average: 25.1%
Dependent repos count: 30.6%
Downloads: 49.9%
Maintainers (1)
Last synced: 6 months ago
pypi.org: m-tel

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.9%
Average: 32.7%
Dependent repos count: 55.6%
Last synced: 6 months ago
pypi.org: tgtelmodif

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.9%
Average: 32.7%
Dependent repos count: 55.6%
Last synced: about 1 year ago
pypi.org: modif

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.9%
Average: 32.7%
Dependent repos count: 55.6%
Last synced: about 1 year ago
pypi.org: fastertelethontest

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.9%
Average: 32.7%
Dependent repos count: 55.6%
Maintainers (1)
Last synced: about 1 year ago
pypi.org: telethon-api

Full-featured Telegram client library for Python 3

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 11.0%
Average: 36.4%
Dependent repos count: 61.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

dev-requirements.txt pypi
  • pytest *
  • pytest-asyncio *
  • pytest-cov *
optional-requirements.txt pypi
  • cryptg *
  • hachoir *
  • pillow *
  • pysocks *
  • python-socks *
readthedocs/requirements.txt pypi
  • telethon *
requirements.txt pypi
  • markdown-it-py *
  • pyaes *
  • rsa *
setup.py pypi
  • pyaes *
  • rsa *