Metadata-Version: 2.1
Name: tmg-data
Version: 0.1.0
Summary: TMG data library
Home-page: https://github.com/telegraph/tmg-data
Author: TMG Data Platform team
Author-email: data.platform@telegraph.co.uk
License: Apache 2.0
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Requires-Dist: bcrypt (==3.1.7)
Requires-Dist: boto3 (==1.14.8)
Requires-Dist: cachetools (==4.1.0)
Requires-Dist: certifi (==2020.4.5.1)
Requires-Dist: cffi (==1.14.0)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: cryptography (==2.9.2)
Requires-Dist: delegator.py (==0.1.1)
Requires-Dist: dnspython (==1.16.0)
Requires-Dist: google-cloud-bigquery (==1.24.0)
Requires-Dist: google-cloud-storage (==1.27.0)
Requires-Dist: httplib2 (==0.17.3)
Requires-Dist: idna (==2.9)
Requires-Dist: Jinja2 (==2.11.2)
Requires-Dist: MarkupSafe (==1.1.1)
Requires-Dist: mysql-connector (==2.2.9)
Requires-Dist: oauth2client (==4.1.3)
Requires-Dist: paramiko (==2.7.1)
Requires-Dist: parse (==1.15.0)
Requires-Dist: pexpect (==4.8.0)
Requires-Dist: protobuf (==3.6.1)
Requires-Dist: ptyprocess (==0.6.0)
Requires-Dist: pyasn1 (==0.4.8)
Requires-Dist: pyasn1-modules (==0.2.8)
Requires-Dist: pycparser (==2.20)
Requires-Dist: PyNaCl (==1.4.0)
Requires-Dist: pysftp (==0.2.9)
Requires-Dist: pytz (==2019.3)
Requires-Dist: requests (==2.23.0)
Requires-Dist: rsa (==4.0)
Requires-Dist: six (==1.14.0)
Requires-Dist: uritemplate (==3.0.1)
Requires-Dist: urllib3 (==1.25.9)
Requires-Dist: simple-salesforce (==1.10.1)

TMG Data Library
==================================

TMG data library has the functionalities to interact with Google Cloud services allowing to develop more reliable and standard data pipelines.

-  `Client Library Documentation`_

.. _Client Library Documentation: https://tmg-data.readthedocs.io

Quick Start
-----------

Installation
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/

Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.5

Mac/Linux
^^^^^^^^^

.. code-block:: console

    pip install virtualenv
    virtualenv <your-env>
    source <your-env>/bin/activate
    <your-env>/bin/pip install tmg-data

Example Usage
-------------

Transform from MySQL to BigQuery
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    from tmg.data import transfer

    transfer_client = transfer.Client(project='your-project-id')

    transfer_client.bq_to_mysql(
        connection_string='root:password@host:port/your-database',
        bq_table='your-project-id.your-dataset.your-table',
        mysql_table='your-database.your-table'
    )


