Giter Site home page Giter Site logo

laughingman7743 / pyathena Goto Github PK

View Code? Open in Web Editor NEW
458.0 7.0 104.0 3.17 MB

PyAthena is a Python DB API 2.0 (PEP 249) client for Amazon Athena.

License: MIT License

Python 99.07% Makefile 0.10% Jinja 0.83%
python dbapi aws athena sqlalchemy

pyathena's Introduction

PyAthena

PyAthena is a Python DB API 2.0 (PEP 249) client for Amazon Athena.

Package badge package badge pypi badge downloads
CI/CD badge test badge docs
Meta badge license Ruff mypy

Requirements

  • Python
    • CPython 3.8 3.9 3.10, 3.11 3.12

Installation

$ pip install PyAthena

Extra packages:

Package Install command Version
SQLAlchemy pip install PyAthena[SQLAlchemy] >=1.0.0
Pandas pip install PyAthena[Pandas] >=1.3.0
Arrow pip install PyAthena[Arrow] >=7.0.0
fastparquet pip install PyAthena[fastparquet] >=0.4.0

Usage

from pyathena import connect

cursor = connect(s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
                 region_name="us-west-2").cursor()
cursor.execute("SELECT * FROM one_row")
print(cursor.description)
print(cursor.fetchall())

License

MIT license

Many of the implementations in this library are based on PyHive, thanks for PyHive.

Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.