Toucan data SDK
Project description
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
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:
from toucan_data_sdk.utils import add_missing_row
Development
Makefile
Use the makefile to test
, build
...
$ make test
Development
You need to install poetry either globally or in a virtualenv.
Then run make install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
toucan_data_sdk-7.5.0.tar.gz
(45.9 kB
view hashes)
Built Distribution
Close
Hashes for toucan_data_sdk-7.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1035b72ab94cafd4c45a0c0724cff73fe7d62fbb310f799c1afd4ced2ade8041 |
|
MD5 | fb66e78748e3d3c984052e3532992b9a |
|
BLAKE2b-256 | 4c5ed0b5b89904967626ba75299d717b197934b0d78222a4b2439bef635a40c6 |