# Laika
![laika_stamp](http://3.bp.blogspot.com/_r7sReQYd6vU/R_eomB1FWfI/AAAAAAAAAVM/PBKP7ng7KVA/s400/Romania_Laika.jpg)
*laika* is a business reporting library that allows you to request data from different sources and send it to someone 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.
Check out the documentation at [readthedocs](http://laika.readthedocs.io/en/latest/index.html).
<!-- TODO: document what it is and what it is not -->
Laika was tested on Python 2.7 and 3.5 or higher.
## Installation
You can install it directly using `pip`:
```bash
$ pip install laika-lib
```
You can specify extra dependencies. To find out what dependencies you need to install, check out reports and results documentation. For example, to install libraries to use Google Drive and Amazon S3 in your reports you must run:
```bash
$ pip install laika-lib[drive, s3]
```
## 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:
```bash
$ pip install laika-lib[test]
```
Then, run test from laika directory:
```bash
$ cd path/to/laika
$ python -m unittest discover
```
PyPI 官网下载 | laika-lib-1.3.1.tar.gz
版权申诉
45 浏览量
2022-02-01
05:45:05
上传
评论
收藏 24KB GZ 举报
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
最新资源
- 福袋点点.apk
- Lengyel E. - Foundations of Game Engine Development(卷一卷二合集).zip
- ### 词向量的介绍、使用技巧和优缺点的文章
- 基于STM32F103CBT6单片机GC65+MP2625+CC1101 GPSTrack模块板硬件(原理图+PCB)工程文件
- ### 通道处理过程模拟概念、优缺点和使用技巧
- ### MyBatis动态SQL介绍说明、使用技巧和优缺点
- 上传下载仿163网盘无刷新文件上传 for Jsp-fileupload-jsp.rar
- VMware Workstation业界非常稳定且安全的桌面虚拟机软件-计算机上运行多个操作系统,支持Windows、DOS等
- 基于STM8L101F3P6单片机+LY2508A33P+CC1100遥控器硬件(原理图+PCB)工程文件.zip
- 上传下载WAP图铃下载系统-unimg.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈