<commit_before>=======
PyTGram
=======

PyTGram is python library to create Telegram Bot based on Twisted.

----------
Installing
----------

~~~~~~~~~~~~~~
Prerequisites:
~~~~~~~~~~~~~~

- Python 3.x

You may need to install additional packages, depending on your operating system:

- Debian/Ubuntu:

.. code::

        $ sudo apt-get install python3-dev libffi-dev libssl-dev

- RHEL/CentOS (for python 3.6):

.. code::

        $ sudo yum install python36u-devel openssl-devel
        $ sudo yum group install "Development Tools"

- FreeBSD:

.. code::

        $ pkg install ca_root_nss

- Windows:

    #. `VS Build Tools <http://landinghub.visualstudio.com/visual-cpp-build-tools>`_

    #. `Windows Extension for Python <https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/>`_

You can install pytgram using pip:

.. code::

    $ pip install pytgram

-----
Usage
-----

~~~~~~~~~~~~~
Webhook setup
~~~~~~~~~~~~~

.. code-block:: python

    from pytgram import set_webhook

    set_webhook('bot_token', 'https://example.com')

If you use self-signed certificate - the pass path to it:

.. code-block:: python
<commit_msg>Edited README<commit_after>=======
PyTGram
=======

PyTGram is python library to create Telegram Bot based on Twisted.

----------
Installing
----------

~~~~~~~~~~~~~~
Prerequisites:
~~~~~~~~~~~~~~

- Python 3.x

You may need to install additional packages, depending on your operating system:

- Debian/Ubuntu:

.. code::

        $ sudo apt-get install python3-dev libffi-dev libssl-dev

- RHEL/CentOS (for python 3.6):

.. code::

        $ sudo yum install python36u-devel openssl-devel
        $ sudo yum group install "Development Tools"

- FreeBSD:

.. code::

        $ pkg install ca_root_nss

- Windows:

    1. `VS Build Tools <http://landinghub.visualstudio.com/visual-cpp-build-tools>`_:

    2. `Windows Extension for Python <https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/>`_:

You can install pytgram using pip:

.. code::

    $ pip install pytgram

-----
Usage
-----

~~~~~~~~~~~~~
Webhook setup
~~~~~~~~~~~~~

.. code-block:: python

    from pytgram import set_webhook

    set_webhook('bot_token', 'https://example.com')

If you use self-signed certificate - the pass path to it:

.. code-block:: python

{'fraction_non_alphanumeric': 0.1799126637554585, 'fraction_numerical': 0.013973799126637555, 'mean_word_length': 2.909556313993174, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5575240', 'n_tokens_mistral': 802, 'n_tokens_neox': 717, 'n_words': 205}