Skip to main content

Atgenomix SeqsLab Connector for Python

Project description

seqslab-connector

The SeqsLab Connector for Python based on pyhive allows you to create a Python DB API connection to Atgenomix SeqsLab interactive jobs (clusters) and develop Python-based workflow applications. It is a Hive-Thrift-based client with no dependencies on ODBC or JDBC. It also provides a SQLAlchemy dialect and an Apache Superset database engine spec for use with tools to execute DQL.

You are welcome to file an issue for general use cases. You can also contact Atgenomix Support here.

Requirements

Python 3.7 or above is required.

Installation

Install using pip.

pip install seqslab-connector

For Apache Superset integration install with

pip install seqslab-connector[superset]

Usage

DB-API

from seqslab import hive

conn = hive.connect(database='run_name', http_path='job_run_id', username='user', password='pass', host='job_cluster_host')
cursor = conn.cursor()
cursor.execute('SHOW TABLES')
print(cursor.fetchall())
cursor.execute('SELECT * FROM my_workflow_table_name LIMIT 10')
print(cursor.fetchall())
cursor.close()

SQLAlchemy

from sqlalchemy.engine import create_engine

engine = create_engine('seqslab+hive://user:pass@job_cluster_host/run_name?http_path=job_run_id')

Apache Superset

Connecting to Databases

Documentation

For the latest documentation, see SeqsLab.

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

seqslab-connector-0.9.6.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

seqslab_connector-0.9.6-py2.py3-none-any.whl (11.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file seqslab-connector-0.9.6.tar.gz.

File metadata

  • Download URL: seqslab-connector-0.9.6.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for seqslab-connector-0.9.6.tar.gz
Algorithm Hash digest
SHA256 a59f16d5f1e25a1b278fa44c6ca9292e2e0c10e3e7a5116e3b87bf446bd1fede
MD5 4f466a506467e073dec45b3861b0e084
BLAKE2b-256 ad6959929ee701511a1b02f54d4908b02d5ce304742d2c7f7c96bfa15c95a3ab

See more details on using hashes here.

File details

Details for the file seqslab_connector-0.9.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for seqslab_connector-0.9.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0e6b56a4400ced88ab0e04b05de853d826663e75330cd624c55e0c07efb52413
MD5 af6870f44eb7fa9a7941f7a15b6e4ae0
BLAKE2b-256 633f10e11bc39e875d1d521bce0379df751395b80e9c38fbcfae3c474592a6cf

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