Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# PyAthena

<div align="center">

<img src="docs/_static/icon.png" alt="PyAthena logo" width="250">

[![PyPI - Version](https://badge.fury.io/py/pyathena.svg)](https://badge.fury.io/py/pyathena)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/PyAthena.svg)](https://pypi.org/project/PyAthena/)
[![PyPI - Downloads](https://static.pepy.tech/badge/pyathena/month)](https://pepy.tech/project/pyathena)
[![CI - Test](https://github.com/laughingman7743/PyAthena/actions/workflows/test.yaml/badge.svg)](https://github.com/laughingman7743/PyAthena/actions/workflows/test.yaml)
[![CD - Docs](https://github.com/laughingman7743/PyAthena/actions/workflows/docs.yaml/badge.svg)](https://github.com/laughingman7743/PyAthena/actions/workflows/docs.yaml)
[![License - MIT](https://img.shields.io/pypi/l/PyAthena.svg)](https://github.com/laughingman7743/PyAthena/blob/master/LICENSE)
[![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![types - Mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)

</div>

-----

PyAthena is a Python [DB API 2.0 (PEP 249)](https://www.python.org/dev/peps/pep-0249/) client for [Amazon Athena](https://docs.aws.amazon.com/athena/latest/APIReference/Welcome.html).

-----

## Requirements

* Python

- CPython 3.10, 3.11, 3.12, 3.13, 3.14

## Installation

```bash
$ 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]` | >=10.0.0 |
| Polars | `pip install PyAthena[Polars]` | >=1.0.0 |

## Usage

```python
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](LICENSE)

Many of the implementations in this library are based on [PyHive](https://github.com/dropbox/PyHive), thanks for [PyHive](https://github.com/dropbox/PyHive).

## Links

- Documentation: https://laughingman7743.github.io/PyAthena/
- PyPI Releases: https://pypi.org/project/PyAthena/
- Source Code: https://github.com/laughingman7743/PyAthena/
- Issue Tracker: https://github.com/laughingman7743/PyAthena/issues

## Logo

The PyAthena logo was generated using [Nano-Banana Pro](https://deepmind.google/models/gemini-image/pro/) (Gemini 3 Pro Image).
101 changes: 0 additions & 101 deletions README.rst

This file was deleted.

6 changes: 6 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ table.docutils td {
text-align: left !important;
}

/* Limit sidebar logo size */
img.sidebar-logo {
max-width: 60% !important;
margin: 0 auto !important;
}

/* Align table itself to the left */
table.docutils {
margin-left: 0;
Expand Down
Binary file added docs/_static/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/icon_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/ogp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/ogp_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/ogp_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def setup(app):
"sphinx.ext.intersphinx",
"sphinx.ext.githubpages",
"sphinx_multiversion",
"sphinxext.opengraph",
]

# Napoleon settings for Google-style docstrings
Expand Down Expand Up @@ -162,6 +163,7 @@ def setup(app):
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "furo"
html_logo = "_static/icon.png"
html_static_path = ["_static"]
html_css_files = [
"custom.css",
Expand All @@ -186,6 +188,13 @@ def setup(app):
]
}

# -- Open Graph protocol settings ----------------------------------------------

ogp_site_url = "https://laughingman7743.github.io/PyAthena/"
ogp_image = "https://laughingman7743.github.io/PyAthena/_static/ogp_white.png"
ogp_description_length = 200
ogp_type = "website"

# -- Sphinx-multiversion configuration ----------------------------------------

# Whitelist pattern for tags (semantic versioning: vX.Y.Z)
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"python-dateutil",
]
requires-python = ">=3.10"
readme = "README.rst"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
Expand Down Expand Up @@ -73,6 +73,7 @@ dev = [
"pytest-dependency",
"sphinx",
"sphinx-multiversion",
"sphinxext-opengraph",
"furo",
"types-python-dateutil",
]
Expand All @@ -90,7 +91,7 @@ only-include = [
"pyathena/",
"LICENSE",
"pyproject.toml",
"README.rst"
"README.md"
]

[tool.hatch.build.targets.wheel]
Expand Down
Loading