Skip to main content

Toucan data SDK

Project description

Pypi-v Pypi-pyversions Pypi-l Pypi-wheel GitHub Actions codecov

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


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.6.0.tar.gz (45.0 kB view details)

Uploaded Source

Built Distribution

toucan_data_sdk-7.6.0-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file toucan_data_sdk-7.6.0.tar.gz.

File metadata

  • Download URL: toucan_data_sdk-7.6.0.tar.gz
  • Upload date:
  • Size: 45.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for toucan_data_sdk-7.6.0.tar.gz
Algorithm Hash digest
SHA256 07e4bcd2fbbb00988528685d83f427907262e0cf6153296ae48a267b9d3c3597
MD5 f0fc1132927e2d0bc8efa37c2c3d4af0
BLAKE2b-256 3f785e54b939d2a4f266a740987c9701779d31ef7815ded5d0ecbd44fe95fd5a

See more details on using hashes here.

File details

Details for the file toucan_data_sdk-7.6.0-py3-none-any.whl.

File metadata

  • Download URL: toucan_data_sdk-7.6.0-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for toucan_data_sdk-7.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8594eea58f0ffdd4a7f5aeb5d01dcb884378264c564911b4076038e27323c88a
MD5 798e853f19b600628e0253ca7c425fde
BLAKE2b-256 5ab6d48ffb33aa7f8970cf5c408cdc2345d21c6c206683300e4371947605a833

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page