Skip to main content

Client library for integration with datagrok API

Project description

Datagrok python client library

This library can be used for integration with datagrok. It is a python wrapper for public API, that has OpenAPI specification available here.

Refer to Help for more information.

Installation

To install package, use pip.

pip install datagrok-api

Usage

To use API client, import DatagrokClient to your project:

from datagrok_api import DatagrokClient

api = DatagrokClient('your token', 'datagrok url')

License

See License.md.

Examples

The package uses Pandas for representation of tables and dataframes.

import pandas as pd
from sklearn.datasets import load_iris

# Calls a Datagrok function
# Dataframes, columns and primitive data types are supported
api.call_function('Abs', {
	'x': -3
})

# Downloads file from a given connection
res = api.download_file('system.demofiles', 'demog.csv')
print(res.head())

# Uploads iris dataset as a table
iris_id = api.upload_table('iris', pd.DataFrame(load_iris()['data']))['ID']

# Iris also can be uploaded as a file
# api.upload_file('system.demofiles', 'iris.csv', 'iris.csv')

# Fetches freshly uploaded Iris table 
res = api.download_table(iris_id)
print(res.head())

# Creates dashboard from iris table with layout uploaded from file "iris.layout"
dashboard_id = api.create_dashboard('python-test', iris_id, layout_filename='iris.layout')['ID']

# Shares dashboard with admin
api.share_dashboard(dashboard_id, 'Test')

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

datagrok_api-0.0.4.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datagrok_api-0.0.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file datagrok_api-0.0.4.tar.gz.

File metadata

  • Download URL: datagrok_api-0.0.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for datagrok_api-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ae89a75a4daed964ca03ecceca35c779de605d1ccea5ba7c594525c76fc59fe7
MD5 c63b0ebe7a5487b2b8f6bc3de286c48d
BLAKE2b-256 7b3b47f47edc1581677e7c8326dab67392735e05386a3a0dad0fa2963e45a365

See more details on using hashes here.

File details

Details for the file datagrok_api-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: datagrok_api-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for datagrok_api-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c5e64b8df2568fef1c2cf3192da4008cdffcd469c05c47ee08c48ab6f6fcc9ee
MD5 c43abe99fbc4c932de97ff997f571eae
BLAKE2b-256 5963409d057f0488639a0f2e7320e048368625f87b5a44227fa0fc61ce9f4d29

See more details on using hashes here.

Supported by

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