Skip to main content

Utility for unified querying across data sources

Project description


Abstracting data source idiosyncrasies so you can stop reading Q&A forums and start reading your data.


pip install spackl

Usage Overview

Query Data

from spackl import db, file

conf = db.Config()

pg = db.Postgres(**conf.default)
bq = db.BigQuery(**conf.bq_datalake)
csv = file.CSV('/path/to/file.csv')

# Same method for all sources
pg_results = pg.query('SELECT id FROM schema.some_table')
bq_results = bq.query('SELECT id FROM dataset.some_table')
csv_results = csv.query()

Access Query Results

by index

# (1234,)

by attribute
# (1234, 1235, 1236)

by key

# (1234, 1235, 1236)

index by index

# 1234

attribute by index[0]
# 1234

key by index

# 1234

index by attribute

# 1234

index by key

# 1234

Other Data Formats

# Pandas Dataframe

# JSON String

# List of tuples

# Vertical dictionary


0.1.0 (2019-03-09)

  • initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spackl, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size spackl-0.1.0.tar.gz (11.8 kB) File type Source Python version None Upload date Hashes View
Filename, size spackl-0.1.0-py3.7.egg (35.6 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size spackl-0.1.0-py3.6.egg (35.5 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size spackl-0.1.0-py2.7.egg (34.5 kB) File type Egg Python version 2.7 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page