Metadata-Version: 2.1
Name: tmg-data
Version: 0.2.10
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
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
License-File: LICENSE
Requires-Dist: oauth2client ==4.1.3
Requires-Dist: google-api-python-client ==2.100.0
Requires-Dist: google-cloud-bigquery ==3.19.0
Requires-Dist: google-cloud-storage ==2.15.0
Requires-Dist: paramiko ==2.8.0
Requires-Dist: Jinja2 ==2.11.2
Requires-Dist: mysql-connector ==2.2.9
Requires-Dist: boto3 ==1.14.8
Requires-Dist: simple-salesforce ==1.10.1
Requires-Dist: parse ==1.15.0
Requires-Dist: delegator.py ==0.1.1
Requires-Dist: markupsafe ==2.0.1
Requires-Dist: pandas ==2.0.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'
    )

