Metadata-Version: 2.1
Name: tfprotocol-client
Version: 1.0.1
Summary: Transfer Protocol client implemented in python.
Home-page: https://github.com/lagcleaner/tfprotocol_client_py
License: LICENSE.rst
Keywords: transfer,protocol,client,python,tfproto,tfprotocol
Author: Leonel Garcia
Author-email: lagcleaner@gmail.com
Requires-Python: >=3.7.2,<4.0.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: multipledispatch (>=0.6.0,<0.7.0)
Requires-Dist: pycryptodome (>=3.15.0,<4.0.0)
Project-URL: Repository, https://github.com/lagcleaner/tfprotocol_client_py
Description-Content-Type: text/x-rst

========================================
TFProtocol Client Implemented in Python
========================================


.. |PyPI version shields.io| image:: https://img.shields.io/pypi/v/tfprotocol-client.svg
    :target: https://pypi.org/project/tfprotocol-client/
.. |Maintenance yes| image:: https://img.shields.io/badge/Maintained%3F-yes-green.svg
    :target: https://GitHub.com/lagcleaner/tfprotocol_client_py/graphs/commit-activity

.. |GitHub issues| image:: https://img.shields.io/github/issues/lagcleaner/tfprotocol_client_py.svg
    :target: https://GitHub.com/lagcleaner/tfprotocol_client_py/issues/
.. |GitHub issues-closed| image:: https://img.shields.io/github/issues-closed/lagcleaner/tfprotocol_client_py.svg
    :target: https://GitHub.com/lagcleaner/tfprotocol_client_py/issues?q=is%3Aissue+is%3Aclosed

----------------
Introduction
----------------

The especifications for the *Transference Protocol* is available in this `repository
<https://github.com/GoDjango-Development/TFProtocol/blob/main/doc/>`_.


---------------
Installation
---------------
The package is available at `pypi <https://pypi.org/project/tfprotocol-client/>`_, to be installed from **pip** with the
next command:

.. code-block:: bash

    pip install tfprotocol_client

----------------------
A Simple Example
----------------------

To use the *Transference Protocol* through this library, you must create an instance of
*TfProtocol* with the specified parameters and have an online server to connect to.

.. code-block:: python

    from tfprotocol_client.misc.constants import RESPONSE_LOGGER
    from tfprotocol_client.tfprotocol import TfProtocol

    ADDRESS = 'tfproto.expresscuba.com'
    PORT = 10345
    clienthash = '<clienthash>'
    publickey = '<publickey>'

    proto = TfProtocol('0.0', publickey, clienthash, ADDRESS, PORT)
    proto.connect()
    proto.echo_command('Hello World', response_handler=RESPONSE_LOGGER)
    proto.disconnect()


----------------------
For Contributors
----------------------

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Development Environment Installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To set up the development environment, all you need as a prerequisite is to have python Python
2.7  or 3.5+ and `poetry <https://python-poetry.org/>`_ installed. If you need to install poetry
follow `these steps <https://python-poetry.org/docs/#installation>`_ and come back. 

With this in mind, to install the necessary dependencies and create a python environment for
this project, proceed to run the following command in the root directory of the project.

.. code-block:: bash

    poetry install


^^^^^^^^^^^^^^^^^^^^
Project Structure
^^^^^^^^^^^^^^^^^^^^

This library is made up of 4 folders and the particular implementations of the ``TfProtocolSuper``
class, the folders are structured as follows:

- **connection**: where all socket and low-level communication is located.
- **models** where the complex objects used all over the package are defined.
- **security** where is implemented the methods and classes to encrypt and decrypt the messages for communication and also the utils for do the hashing stuff where is needed.
- **misc** folder to hold all utils and not related to any other folder concept.

Here the visual schema for all the classes and his relations with others:

.. image:: https://raw.githubusercontent.com/lagcleaner/tfprotocol_client_py/master/doc/static/classes.png
    :alt: class relations
    :align: center

^^^^^^^^^^^^^^^^
Publishing
^^^^^^^^^^^^^^^^

To publish the package you need to run the following command in the root directory of the package:

.. code-block:: bash

    poetry publish

.. |Ask Me Anything !| image:: https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg
    :target: https://t.me/LagCleaner

