Skip to main content

PyAthena

A python client to query on Athena Database. Query results are formatted in pandas dataframe.

Install

pip install git+https://github.com/yardstick17/PyAthena.git

Usage

In [9]: from athena import Athena

In [10]: query =    """SELECT col1, col2, col3, col3  
                        FROM "database"."table1"
                        WHERE col1 = 'PI912A0CV-O12'
                            AND col2 = '2019-03-04'
                            AND schema='best_model_ever'
                    """

In [11]: df = athena_client.execute_with_pandas(query=query)

In [12]: df.head()
Out[12]:
            col1           col2                   col3                      col3
0  PI912A0CV-O12   2019-03-04                      0.0                      2.623155
1  PI912A0CV-O12   2019-03-04                      0.0                      2.095256
2  PI912A0CV-O12   2019-03-04                      0.0                      1.904961
3  PI912A0CV-O12   2019-03-04                      0.0                      0.829332
4  PI912A0CV-O12   2019-03-04                      0.0                      0.058469

Metadata

Release files for python-athena 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-athena 0.2.1
File Size Uploaded
python-athena-0.2.1.tar.gz 1.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-athena 0.2.1
File Interpreter ABI Platform
python_athena-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 kB

Release files / python-athena-0.2.1.tar.gz

Download URL python-athena-0.2.1.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
479d8cd1dbd3aa88c7b3e874f93120e0f4b774bc5cbd904d5b7bbecc842fd98b
BLAKE2b-256 checksum
How to use checksums
0f58f1f300a3ed57e7b93e455149d73ec74ac53e668eacb303f0fff159ac5735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5

Release files / python_athena-0.2.1-py3-none-any.whl

Download URL python_athena-0.2.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a811c6cc6681ad2294bf60c83d6775adf686fe665ccb8f68d17c2caa03da2cc0
BLAKE2b-256 checksum
How to use checksums
6670fb9c38aa35c702fd0b1389facdb373c6156c62312879ca8c55a289cdea2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page