Metadata-Version: 2.1
Name: laika-lib
Version: 1.0.0
Summary: A simple business reporting library
Home-page: https://github.com/trocafone/laika
Author: Seva Gavrilov
Author-email: gavrilovseva@gmail.com
Maintainer: Trocafone Data Science Team
Maintainer-email: ds@trocafone.com
License: MIT
Keywords: report reporting etl sql s3 drive ftp adwords
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
Provides-Extra: postgres
Provides-Extra: s3
Provides-Extra: docs
Provides-Extra: excel
Provides-Extra: drive
Provides-Extra: all_reports
Provides-Extra: sftp
Provides-Extra: adwords
Provides-Extra: test
Provides-Extra: query
Requires-Dist: click (==6.2)
Requires-Dist: pandas (==0.19.2)
Requires-Dist: requests (==2.9.1)
Provides-Extra: adwords
Requires-Dist: googleads (==11.0.1); extra == 'adwords'
Provides-Extra: all_reports
Requires-Dist: xlrd (==1.1.0); extra == 'all_reports'
Requires-Dist: XlsxWriter (==0.8.4); extra == 'all_reports'
Requires-Dist: SQLAlchemy (==1.0.11); extra == 'all_reports'
Requires-Dist: psycopg2 (==2.6.1); extra == 'all_reports'
Requires-Dist: PyDrive (==1.3.1); extra == 'all_reports'
Requires-Dist: googleads (==11.0.1); extra == 'all_reports'
Requires-Dist: boto3 (==1.4.3); extra == 'all_reports'
Requires-Dist: paramiko (==2.0.1); extra == 'all_reports'
Provides-Extra: docs
Requires-Dist: Sphinx (>=1.7.1); extra == 'docs'
Requires-Dist: sphinx-rtd-theme (>=0.2.4); extra == 'docs'
Provides-Extra: drive
Requires-Dist: PyDrive (==1.3.1); extra == 'drive'
Provides-Extra: excel
Requires-Dist: xlrd (==1.1.0); extra == 'excel'
Requires-Dist: XlsxWriter (==0.8.4); extra == 'excel'
Provides-Extra: postgres
Requires-Dist: SQLAlchemy (==1.0.11); extra == 'postgres'
Requires-Dist: psycopg2 (==2.6.1); extra == 'postgres'
Provides-Extra: query
Requires-Dist: SQLAlchemy (==1.0.11); extra == 'query'
Provides-Extra: s3
Requires-Dist: boto3 (==1.4.3); extra == 's3'
Provides-Extra: sftp
Requires-Dist: paramiko (==2.0.1); extra == 'sftp'
Provides-Extra: test
Requires-Dist: mock (==1.3.0); extra == 'test'

# Laika

*laika* is a business reporting library that allows you to request data from different sources and send it to someone as or save it at some destination. For example: you can query your database, send the result as an excel attachment via email and save it on Google Drive or Amazon S3.

TODO: document what it is and what it is not

## Installation

TODO: document this

## Usage

`laika.py` is a script that lets you use laika library. You can run it like this:

```bash
$ laika.py some_report
```

This command will run the report named *some_report*. This report must be defined in some configuration file. By default laika looks for `config.json` in the same directory. You can specify a custom config passing `-c` parameter:

```bash
$ laika.py -c my_config.json
```

Path to configuration file can also be specified with the `LAIKA_CONFIG_FILE_PATH` environment variable:

```bash
$ export LAIKA_CONFIG_FILE_PATH='/home/me/my_config.json'
$ laika.py my_report
```

Another parameter you can use is `--pwd` which serves for specifying working directory. It can also be specified in configuration file or `LAIKA_PWD` environment variable.

### Arguments

You can check all the predefined `laika.py` arguments with `--help`.

Undefined arguments will be added to report's definition overwriting default values. Thus, if for example the configuration for `my_report` defines field `my_field` with value `foo`, if you execute it like this:

```bash
$ laika.py my_report --my_field bar
```

`my_field` configuration will contain `bar` as value.


## Testing

To run test, you must install test dependencies:

TODO: document

Then, run test from laika directory:

```bash
$ cd path/to/laika
$ python -m unittest discover
```


