$npx skillfedfor your agent

PyAthena

Python DB API 2.0 (PEP 249) client for Amazon Athena

With conditionsPyPI Front-EndsReleased Jul 202624.5M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyathena-3.35.4-py3-none-any.whl
v3.35.4 · released 2026-07-31 · Python >=3.10 · 5 runtime deps: boto3, botocore, fsspec, python-dateutil, tenacity

Yes, if you need to query S3 data via SQL from Python. PyAthena is actively maintained, has no known vulnerabilities, low install friction, and provides a standard DB API interface. The permissive MIT license poses no restrictions. Install it if you're already using Athena; skip it if you don't have AWS infrastructure or prefer direct boto3 calls.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • AWS credentials must be configured (via boto3) and you must have an S3 bucket for staging query results.
  • Low install friction with a pure-Python wheel.
  • Actively maintained with a release 14 days ago and last commit on 2026-08-11.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) — you can use, modify, and distribute PyAthena freely in commercial and private projects with minimal restrictions.

last release 2026-07-31 (14 days) · last repo commit 2026-08-11 · 492 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 24,458,508 downloads/mo, #918 on PyPI

Verify before relying

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.fetchall())
  • Whether optional extras (SQLAlchemy, Pandas, Polars, Arrow) are commonly used or niche.
  • Performance characteristics and query timeout behavior compared to direct AWS SDK usage.
  • Support for Athena-specific features like workgroups, result reuse, or query cost controls.
Same gist for agents: .md · .json

What it is and what it does

PyAthena wraps Amazon Athena's API in a standard Python DB API 2.0 interface, letting you run SQL queries against data stored in S3 without managing a database server. It depends on boto3 and botocore for AWS authentication and communication, fsspec for S3 filesystem abstraction, python-dateutil for timestamp handling, and tenacity for automatic retry logic on transient failures.

The package supports both blocking (synchronous) queries via `connect()` and native asyncio queries via `aio_connect()`, making it suitable for both traditional scripts and async applications. Query results are staged to S3 before retrieval, so you need an S3 bucket and valid AWS credentials configured. Optional extras allow integration with SQLAlchemy, Pandas, Polars, and Arrow for data transformation workflows.

Use it for

  • Run ad-hoc SQL queries against S3 data lakes without provisioning a data warehouse.
  • Integrate Athena queries into Python ETL pipelines using the standard DB API interface.
  • Load query results directly into Pandas or Polars DataFrames for analysis.
  • Build async applications that query Athena without blocking the event loop.
  • Use SQLAlchemy ORM or query builder with Athena as a backend.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to query S3 data via SQL from Python.

PyAthena is actively maintained, has no known vulnerabilities, low install friction, and provides a standard DB API interface. The permissive MIT license poses no restrictions. Install it if you're already using Athena; skip it if you don't have AWS infrastructure or prefer direct boto3 calls.

Install

pyathena on PyPI

Before you install

Low install friction with a pure-Python wheel. Actively maintained with a release 14 days ago and last commit on 2026-08-11. Supports Python 3.10 through 3.14.

AWS credentials must be configured (via boto3) and you must have an S3 bucket for staging query results.

License in practice

MIT license (permissive) — you can use, modify, and distribute PyAthena freely in commercial and private projects with minimal restrictions.

Quickstart

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.fetchall())

Verify before relying

  • Whether optional extras (SQLAlchemy, Pandas, Polars, Arrow) are commonly used or niche.
  • Performance characteristics and query timeout behavior compared to direct AWS SDK usage.
  • Support for Athena-specific features like workgroups, result reuse, or query cost controls.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
boto3botocorefsspecpython-dateutiltenacity
MaintenanceActively maintained 14 days since the last release
Last repo commit
First released
Downloads24,458,508 / month, #918 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Database :: Front-Ends

Evidence: pyathena-3.35.4-py3-none-any.whl

Tags

Capabilities
amazon athena sql clientquery s3 with sql pythondb api 2.0 athenaasync athena queriespython athena connector
Topics
aws-athenasql-clientasync-support

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “amazon athena sql client”

  • PyAthenaPyAthena is a Python DB API 2.0 client for Amazon Athena that lets…
  • pyathenajdbcPyAthenaJDBC wraps the Amazon Athena JDBC driver to provide a Python…
  • dbt-athenadbt-athena is a dbt adapter that enables data transformation…

Give your agent the search over MCP, or paste the wish link into any chat.

More Front-Ends packages

SQLAlchemy Worth it
PyPI · Front-Ends · released Aug 2026

SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.

permissive licensepure Python · 3.7+
422.7Mdownloads / mo
psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
alembic Worth it
PyPI · Front-Ends · released Aug 2026

Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.

Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.

MITpure Python · 3.10+
215.2Mdownloads / mo
weaviate-client Worth it
PyPI · Front-Ends · released Aug 2026

A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.

permissive licensepure Python · 3.10+
213.2Mdownloads / mo
databricks-sql-connector Worth it
PyPI · Front-Ends · released Jul 2026

A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.

Install it if you need to query Databricks clusters or SQL warehouses from Python.

Apache-2.0pure Python
119.5Mdownloads / mo
psycopg Worth it
PyPI · Software Development · released May 2026

Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.

Install it if you need to connect Python to PostgreSQL.

LGPL-3.0-onlypure Python · 3.10+
117.0Mdownloads / mo

See also pyathenajdbc · pythena · pydynamodb · dbt-athena · dbt-athena-community · awswrangler · redshift-connector · PyHive · hdbcli