Client for the Cannerflow
Project description
Introduction
This package provides a client interface to query Cannerflow a distributed SQL engine. It supports Python 2.7, 3.5, 3.6, and pypy.
Installation
$ pip install cannerflow-python-client
Quick Start
Client
client = cannerflow.client.bootstrap(
endpoint="http://localhost:3000",
workspace_id=WORKSPACE_ID,
headers={
'X-CANNERFLOW-SECRET': JUPYTER_SECRET,
'X-CANNERFLOW-WORKSPACE-ID': WORKSPACE_ID
}
)
queries = client.list_saved_query()
query = client.use_saved_query('region')
raws = query.get_all()
Development
Setup virtual env
python3 -m venv env
source env/bin/activate
Install package for test
pip install -e .[tests]
Run test with given workspaceId and token
example
export WORKSPACE_ID="2fae9bf7-a883-4f25-9566-c0d379c44440"
export CSV_FILE="test.csv"
export CANNERFLOW_PERSONAL_ACCESS_TOKEN=Y2xpZW50X2U3MWIxOTIwLWQyYTktNDkyMy05MDdhLWM3MDE4Njk3MmQwNzpjMTI4MzRjNTkxOGI5N2E2ZTBiYzVhN2I3NDllZGRhYg==
python3 -m tests.test_utils
python3 -m tests.test_client
python3 -m tests.test_csv_wrapper
Publish
# update version in __init__
vim cannerflow/__init__.py
rm -rf dist
python setup.py sdist
twine upload dist/*
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
Close
Hashes for cannerflow-python-client-0.29.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca3e63765e0aa6f117cfcea9956684a9ff1bc4276190ae8099fc51329640b8a5 |
|
MD5 | 48b8f894025d8080698952c9400eb4a6 |
|
BLAKE2b-256 | 05d7ab4e0d3054cecb373c0d87d0795caef92fb0dc1b985ecacdb579c754da16 |