https://github.com/toucantoco/toucan-data-sdk
https://github.com/toucantoco/toucan-data-sdk
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/toucantoco/toucan-data-sdk
- Owner: ToucanToco
- License: bsd-3-clause
- Archived: true
- Created: 2019-03-05T14:33:32.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T03:00:07.000Z (12 months ago)
- Last Synced: 2025-04-11T04:17:26.094Z (about 1 month ago)
- Language: Python
- Size: 668 KB
- Stars: 2
- Watchers: 16
- Forks: 2
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/toucan-data-sdk)
[](https://pypi.python.org/pypi/toucan-data-sdk)
[](https://pypi.python.org/pypi/toucan-data-sdk)
[](https://pypi.python.org/pypi/toucan-data-sdk)
[](https://github.com/ToucanToco/toucan-data-sdk/actions?query=workflow%3ACI)
[](https://codecov.io/gh/ToucanToco/toucan-data-sdk)
# Toucan Data SDKDevelop 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 ToucanDataSdkinstance_url = 'https://api-demo.toucantoco.com'
auth = ('', 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`