Metadata-Version: 2.1
Name: toucan-data-sdk
Version: 7.5.0
Summary: Toucan data SDK
Home-page: https://github.com/ToucanToco/toucan-data-sdk
License: BSD-3-Clause
Author: Toucan Toco
Author-email: dev@toucantoco.com
Requires-Python: >=3.8,<4.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Requires-Dist: engarde (>=0.4.0,<0.5.0)
Requires-Dist: joblib (<1)
Requires-Dist: pandas (>=1.4.1,<2.0.0)
Requires-Dist: python-slugify (>=5.0.2,<6.0.0)
Requires-Dist: tabulate (>=0.8.9,<0.9.0)
Requires-Dist: toucan-client (>=1.1.0,<2.0.0)
Project-URL: Documentation, https://toucantoco.github.io/toucan-data-sdk
Project-URL: Repository, https://github.com/ToucanToco/toucan-data-sdk
Description-Content-Type: text/markdown

[![Pypi-v](https://img.shields.io/pypi/v/toucan-data-sdk.svg)](https://pypi.python.org/pypi/toucan-data-sdk)
[![Pypi-pyversions](https://img.shields.io/pypi/pyversions/toucan-data-sdk.svg)](https://pypi.python.org/pypi/toucan-data-sdk)
[![Pypi-l](https://img.shields.io/pypi/l/toucan-data-sdk.svg)](https://pypi.python.org/pypi/toucan-data-sdk)
[![Pypi-wheel](https://img.shields.io/pypi/wheel/toucan-data-sdk.svg)](https://pypi.python.org/pypi/toucan-data-sdk)
[![GitHub Actions](https://github.com/ToucanToco/toucan-data-sdk/workflows/CI/badge.svg)](https://github.com/ToucanToco/toucan-data-sdk/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/ToucanToco/toucan-data-sdk/branch/master/graph/badge.svg?token=GtzvxpgQM9)](https://codecov.io/gh/ToucanToco/toucan-data-sdk)
# Toucan Data SDK

Develop your Toucan Toco data pipeline from the confort of your favorite environment.

# Installation

For usage: `pip install toucan_data_sdk`

For dev:

Install the module in editable mode and with test requirements: `pip install -e '.[test]'`

# Usage

## Get data sources

```python
import getpass
from toucan_data_sdk import ToucanDataSdk

instance_url = 'https://api-demo.toucantoco.com'
auth = ('<username>', getpass.getpass())

sdk = ToucanDataSdk(instance_url, small_app='demo', auth=auth, enable_cache=True)
dfs = sdk.get_dfs()
```

# API

## ToucanDataSdk class

### ToucanDataSdk.sdk

* property,
* uses the client to send a request to the back end to send the data sources
as DataFrames,
* uses an internal cache.

### ToucanDataSdk.invalidate_cache()

Invalidates the cache. Next time you will access to the sdk property, a
request will be sent to the client.

### Utils

cf. https://docs.toucantoco.com/concepteur/data-sources/00-generalities.html#utility-functions

For example:

```python
from toucan_data_sdk.utils import add_missing_row
```

# Development

## Makefile

Use the makefile to `test`, `build`...

```shell
$ make test
```

# Development

You need to install [poetry](https://python-poetry.org/) either globally or in a virtualenv.
Then run `make install`

