Pyrography


NamePyrography JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/d3cryptofc/pyrography
SummaryA Pyrogram fork inspired by Pyromod & AmanoTeam/Pyrogram.
upload_time2023-07-12 06:13:58
maintainer
docs_urlNone
authorLelzin λ
requires_python~=3.7
licenseLGPLv3
keywords telegram chat messenger mtproto api client library python
VCS
bugtrack_url
requirements pyaes pysocks rich TgCrypto
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <a href="https://github.com/pyrogram/pyrogram">
        <img src="https://github.com/d3cryptofc/pyrography/assets/47941854/0eb90a78-5054-497e-8c86-b5f6bbb70822" alt="Pyrogram" width="128">
    </a>
    <br>
    <b>Telegram MTProto API Framework for Python</b>
    <br/>A wonderful Pyrogram fork inspired by Pyromod & AmanoTeam/Pyrogram
    <br>
    <a href="https://github.com/d3cryptofc/pyrography/releases">
        Releases
    </a>
    •
    <a href="https://t.me/forkpyrography">
        News
    </a>
</p>

## Pyrography

> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

```python3
from pyrography import Client, filters


# Creating a client instance to control your bot.
# NOTE: Get your `api_id` and `api_hash` credentials on: my.telegram.org.
# (optional `bot_token` parameter)
client = Client(
    name='your_session_name',
    api_id=...,
    api_hash=...
)


@client.on_message(filters.command('start'))
async def ask_user_name(client, message):
    # Ask the user age.
    asking = message.ask("What's your name?", quote=True)

    # Getting ask message and answer message.
    # TIP: you can to use `async for` too!
    ask, answer = await anext(asking)

    # Getting message text.
    user_name = answer.text

    # Replying message, without quote.
    await answer.reply(f'Nice name, {user_name}!', quote=False)


if __name__ == '__main__':
    # Starting client and listening for updates.
    client.run()
```

**Pyrography** is a modern, elegant and asynchronous [MTProto API](https://docs.pyrogram.org/topics/mtproto-vs-botapi)
framework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot
identity (bot API alternative) using Python.

#### Why should you use Pyrography?

##### 1. Stop safety
Pyrography is the only mtproto library currently that when pressing `CTRL` + `C` to interrupt the program, it will wait for pending commands to finish, preventing anything from being incomplete.

### To most performance and others

##### 1. Fast cryptography ([TgCrypto](https://pypi.org/project/TgCrypto/))
A Cryptography Library written in C as a Python extension. It is designed to be portable, fast, easy to install and use. TgCrypto is intended for Pyrogram and implements the cryptographic algorithms Telegram requires.

Automatically installed, ignore it.

##### 2. Fast event loop ([Uvloop](https://pypi.org/project/uvloop/))
A fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.

Install it, import it and call `uvloop.install()` in your main script.

##### 3. Wonderful logging ([Rich](https://pypi.org/project/rich/))
Enabled by default, but you can to disable it setting **log_level** parameter to `logging.NOTSET`.

[Read more here](https://rich.readthedocs.io/en/stable/logging.html).

##### 4. Low latency
On hosting, choose an region close to Miami to your machine.

### Installing

#### Pypi

```
python3 -m pip install pyrography
```

#### Github

```
python3 -m pip install git+https://github.com/d3cryptofc/pyrography
```

### Support Official Pyrogram

If you'd like to support the official Pyrogram, you can consider:

- [Become a GitHub sponsor](https://github.com/sponsors/delivrance).
- [Become a LiberaPay patron](https://liberapay.com/delivrance).
- [Become an OpenCollective backer](https://opencollective.com/pyrogram).

### Resources

- Check out the docs at https://docs.pyrogram.org to learn more about Pyrogram, get started right
away and discover more in-depth material for building your client applications.
- Join the official channel at https://t.me/pyrogram and stay tuned for news, updates and announcements.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/d3cryptofc/pyrography",
    "name": "Pyrography",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.7",
    "maintainer_email": "",
    "keywords": "telegram chat messenger mtproto api client library python",
    "author": "Lelzin \u03bb",
    "author_email": "d3cryptofc@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ec/2f/e7e8cc4e6317f4506c57bd90ff0118a7057db0d9a78ddc5125dd84cc8a92/Pyrography-1.0.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <a href=\"https://github.com/pyrogram/pyrogram\">\n        <img src=\"https://github.com/d3cryptofc/pyrography/assets/47941854/0eb90a78-5054-497e-8c86-b5f6bbb70822\" alt=\"Pyrogram\" width=\"128\">\n    </a>\n    <br>\n    <b>Telegram MTProto API Framework for Python</b>\n    <br/>A wonderful Pyrogram fork inspired by Pyromod & AmanoTeam/Pyrogram\n    <br>\n    <a href=\"https://github.com/d3cryptofc/pyrography/releases\">\n        Releases\n    </a>\n    \u2022\n    <a href=\"https://t.me/forkpyrography\">\n        News\n    </a>\n</p>\n\n## Pyrography\n\n> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots\n\n```python3\nfrom pyrography import Client, filters\n\n\n# Creating a client instance to control your bot.\n# NOTE: Get your `api_id` and `api_hash` credentials on: my.telegram.org.\n# (optional `bot_token` parameter)\nclient = Client(\n    name='your_session_name',\n    api_id=...,\n    api_hash=...\n)\n\n\n@client.on_message(filters.command('start'))\nasync def ask_user_name(client, message):\n    # Ask the user age.\n    asking = message.ask(\"What's your name?\", quote=True)\n\n    # Getting ask message and answer message.\n    # TIP: you can to use `async for` too!\n    ask, answer = await anext(asking)\n\n    # Getting message text.\n    user_name = answer.text\n\n    # Replying message, without quote.\n    await answer.reply(f'Nice name, {user_name}!', quote=False)\n\n\nif __name__ == '__main__':\n    # Starting client and listening for updates.\n    client.run()\n```\n\n**Pyrography** is a modern, elegant and asynchronous [MTProto API](https://docs.pyrogram.org/topics/mtproto-vs-botapi)\nframework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot\nidentity (bot API alternative) using Python.\n\n#### Why should you use Pyrography?\n\n##### 1. Stop safety\nPyrography is the only mtproto library currently that when pressing `CTRL` + `C` to interrupt the program, it will wait for pending commands to finish, preventing anything from being incomplete.\n\n### To most performance and others\n\n##### 1. Fast cryptography ([TgCrypto](https://pypi.org/project/TgCrypto/))\nA Cryptography Library written in C as a Python extension. It is designed to be portable, fast, easy to install and use. TgCrypto is intended for Pyrogram and implements the cryptographic algorithms Telegram requires.\n\nAutomatically installed, ignore it.\n\n##### 2. Fast event loop ([Uvloop](https://pypi.org/project/uvloop/))\nA fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.\n\nInstall it, import it and call `uvloop.install()` in your main script.\n\n##### 3. Wonderful logging ([Rich](https://pypi.org/project/rich/))\nEnabled by default, but you can to disable it setting **log_level** parameter to `logging.NOTSET`.\n\n[Read more here](https://rich.readthedocs.io/en/stable/logging.html).\n\n##### 4. Low latency\nOn hosting, choose an region close to Miami to your machine.\n\n### Installing\n\n#### Pypi\n\n```\npython3 -m pip install pyrography\n```\n\n#### Github\n\n```\npython3 -m pip install git+https://github.com/d3cryptofc/pyrography\n```\n\n### Support Official Pyrogram\n\nIf you'd like to support the official Pyrogram, you can consider:\n\n- [Become a GitHub sponsor](https://github.com/sponsors/delivrance).\n- [Become a LiberaPay patron](https://liberapay.com/delivrance).\n- [Become an OpenCollective backer](https://opencollective.com/pyrogram).\n\n### Resources\n\n- Check out the docs at https://docs.pyrogram.org to learn more about Pyrogram, get started right\naway and discover more in-depth material for building your client applications.\n- Join the official channel at https://t.me/pyrogram and stay tuned for news, updates and announcements.\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "A Pyrogram fork inspired by Pyromod & AmanoTeam/Pyrogram.",
    "version": "1.0.2",
    "project_urls": {
        "Community": "https://t.me/forkpyrography",
        "Documentation": "https://docs.pyrogram.org",
        "Download": "https://github.com/d3cryptofc/pyrography/releases/latest",
        "Homepage": "https://github.com/d3cryptofc/pyrography",
        "Source": "https://github.com/d3cryptofc/pyrography",
        "Tracker": "https://github.com/d3cryptofc/pyrography/issues"
    },
    "split_keywords": [
        "telegram",
        "chat",
        "messenger",
        "mtproto",
        "api",
        "client",
        "library",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f2b0cd91c38043aecf68c046164ad5e87bb4b77ec450edca7a9e8d6ed3f53b0",
                "md5": "a2504a33f90d36714aa79834569354a8",
                "sha256": "4c380847b23d5e4f643c9a93c4db249034295e0982769c725db55e4fe449bc15"
            },
            "downloads": -1,
            "filename": "Pyrography-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2504a33f90d36714aa79834569354a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.7",
            "size": 3746965,
            "upload_time": "2023-07-12T06:13:53",
            "upload_time_iso_8601": "2023-07-12T06:13:53.982290Z",
            "url": "https://files.pythonhosted.org/packages/2f/2b/0cd91c38043aecf68c046164ad5e87bb4b77ec450edca7a9e8d6ed3f53b0/Pyrography-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec2fe7e8cc4e6317f4506c57bd90ff0118a7057db0d9a78ddc5125dd84cc8a92",
                "md5": "689eaf3f7fd7113e8f9eabb1f2d326b8",
                "sha256": "38ad7630286e37e3c9d45eec89a981bce4c1e287870d251db6873af78253d59d"
            },
            "downloads": -1,
            "filename": "Pyrography-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "689eaf3f7fd7113e8f9eabb1f2d326b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.7",
            "size": 352813,
            "upload_time": "2023-07-12T06:13:58",
            "upload_time_iso_8601": "2023-07-12T06:13:58.122442Z",
            "url": "https://files.pythonhosted.org/packages/ec/2f/e7e8cc4e6317f4506c57bd90ff0118a7057db0d9a78ddc5125dd84cc8a92/Pyrography-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 06:13:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "d3cryptofc",
    "github_project": "pyrography",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pyaes",
            "specs": [
                [
                    "==",
                    "1.6.1"
                ]
            ]
        },
        {
            "name": "pysocks",
            "specs": [
                [
                    "==",
                    "1.7.1"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "~=",
                    "13.4.2"
                ]
            ]
        },
        {
            "name": "TgCrypto",
            "specs": [
                [
                    "~=",
                    "1.2.5"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "pyrography"
}
        
Elapsed time: 0.09158s