Codenize your data sources
Project description
akagi
Free software: MIT license
Features
akagi supports iter and save interface for various datasources such as Amazon Redshift, Amazon S3 (more in future).
Installation
Install via pip:
pip install akagi
or from source:
$ git clone https://github.com/ayemos/akagi akagi $ cd akagi $ python setup.py install
Example
RedshiftDatasource
ds = RedshiftDatasource.for_query(
'log-redshift-unload.ap-northeast-1', # S3 Bucket for intermediate storage
'select * from (select user_id, path from logs.imp limit 10000)', # Your Query here
'logs', # schema
'imp' # table (Those two are used to generate unique prefix for S3 object (e.g. logs/imp/20170312_081527)
)
ds.save('./akagi_test') # save results to local
for d in ds:
print(d) # iterate on result
S3Datasource
ds = S3Datasource.for_prefix(
'image-data.ap-northeast-1',
'data/image_net/zebra',
FileFormat.BINARY
)
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
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
akagi-0.1.3.tar.gz
(7.3 kB
view hashes)
Built Distribution
akagi-0.1.3-py2.py3-none-any.whl
(13.3 kB
view hashes)
Close
Hashes for akagi-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b097abd8ef7a3f96bd94e3ba7d5a385d63436c5047af6a54c8b568b8c6947e2b |
|
MD5 | 7eddd3297f93fa283ac2294a73e26618 |
|
BLAKE2b-256 | de7fdd8b46e8aa43978c9374eae4b2c80cc8854cec2e2ee367daec5bdf0b4d85 |