Metadata-Version: 2.1
Name: spackl
Version: 0.1.0
Summary: Utility for unified querying across data sources
Home-page: https://github.com/aaronbiller/spackl
Author: Aaron Biller
Author-email: aaronbiller@gmail.com
License: MIT
Description: # Spackl
        Abstracting data source idiosyncrasies so you can stop reading Q&A forums and start reading your data.
        
        ## Installation
        ```
        pip install spackl
        ```
        
        ## Usage Overview
        #### Query Data
        ```python
        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_
        ```python
        results[0]
        # (1234,)
        ```
        
        _by attribute_
        ```python
        results.id
        # (1234, 1235, 1236)
        ```
        
        _by key_
        ```python
        results['id']
        # (1234, 1235, 1236)
        ```
        
        _index by index_
        ```python
        results[0][0]
        # 1234
        ```
        
        _attribute by index_
        ```python
        results.id[0]
        # 1234
        ```
        
        _key by index_
        ```python
        results['id'][0]
        # 1234
        ```
        
        _index by attribute_
        ```python
        results[0].id
        # 1234
        ```
        
        _index by key_
        ```python
        results[0]['id']
        # 1234
        ```
        
        #### Other Data Formats
        ```python
        # Pandas Dataframe
        results.df()
        
        # JSON String
        results.json()
        
        # List of tuples
        results.list()
        
        # Vertical dictionary
        results.dict()
        ```
        
        # CHANGELOG
        
        ## 0.1.0 (2019-03-09)
        -  initial release
        
Keywords: utility query database csv file
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Database
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
