Skip to content

Commit cea32da

Browse files
Add project logo and convert README from RST to Markdown
- Convert README.rst to README.md with equivalent content - Add project icon and logo images to docs/_static/ - Display centered icon with badge links in README header - Add sidebar logo CSS for Sphinx documentation - Update pyproject.toml references from README.rst to README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e6bb6e3 commit cea32da

File tree

10 files changed

+82
-104
lines changed

10 files changed

+82
-104
lines changed

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# PyAthena
2+
3+
<div align="center">
4+
5+
<img src="docs/_static/icon.png" alt="PyAthena logo" width="250">
6+
7+
[![PyPI - Version](https://badge.fury.io/py/pyathena.svg)](https://badge.fury.io/py/pyathena)
8+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/PyAthena.svg)](https://pypi.org/project/PyAthena/)
9+
[![PyPI - Downloads](https://static.pepy.tech/badge/pyathena/month)](https://pepy.tech/project/pyathena)
10+
[![CI - Test](https://github.com/laughingman7743/PyAthena/actions/workflows/test.yaml/badge.svg)](https://github.com/laughingman7743/PyAthena/actions/workflows/test.yaml)
11+
[![CD - Docs](https://github.com/laughingman7743/PyAthena/actions/workflows/docs.yaml/badge.svg)](https://github.com/laughingman7743/PyAthena/actions/workflows/docs.yaml)
12+
[![License - MIT](https://img.shields.io/pypi/l/PyAthena.svg)](https://github.com/laughingman7743/PyAthena/blob/master/LICENSE)
13+
[![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)
14+
[![types - Mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
15+
16+
</div>
17+
18+
-----
19+
20+
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).
21+
22+
-----
23+
24+
## Requirements
25+
26+
* Python
27+
28+
- CPython 3.10, 3.11, 3.12, 3.13, 3.14
29+
30+
## Installation
31+
32+
```bash
33+
$ pip install PyAthena
34+
```
35+
36+
Extra packages:
37+
38+
| Package | Install command | Version |
39+
|------------|--------------------------------------|----------|
40+
| SQLAlchemy | `pip install PyAthena[SQLAlchemy]` | >=1.0.0 |
41+
| Pandas | `pip install PyAthena[Pandas]` | >=1.3.0 |
42+
| Arrow | `pip install PyAthena[Arrow]` | >=10.0.0 |
43+
| Polars | `pip install PyAthena[Polars]` | >=1.0.0 |
44+
45+
## Usage
46+
47+
```python
48+
from pyathena import connect
49+
50+
cursor = connect(s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
51+
region_name="us-west-2").cursor()
52+
cursor.execute("SELECT * FROM one_row")
53+
print(cursor.description)
54+
print(cursor.fetchall())
55+
```
56+
57+
## License
58+
59+
[MIT license](LICENSE)
60+
61+
Many of the implementations in this library are based on [PyHive](https://github.com/dropbox/PyHive), thanks for [PyHive](https://github.com/dropbox/PyHive).
62+
63+
## Links
64+
65+
- Documentation: https://laughingman7743.github.io/PyAthena/
66+
- PyPI Releases: https://pypi.org/project/PyAthena/
67+
- Source Code: https://github.com/laughingman7743/PyAthena/
68+
- Issue Tracker: https://github.com/laughingman7743/PyAthena/issues
69+
70+
## Logo
71+
72+
The PyAthena logo was generated using [Nano-Banana Pro](https://deepmind.google/models/gemini-image/pro/) (Gemini 3 Pro Image).

README.rst

Lines changed: 0 additions & 101 deletions
This file was deleted.

docs/_static/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ table.docutils td {
44
text-align: left !important;
55
}
66

7+
/* Limit sidebar logo size */
8+
img.sidebar-logo {
9+
max-width: 60% !important;
10+
margin: 0 auto !important;
11+
}
12+
713
/* Align table itself to the left */
814
table.docutils {
915
margin-left: 0;

docs/_static/icon.png

2.61 MB
Loading

docs/_static/icon_square.png

2.7 MB
Loading

docs/_static/logo.png

3.5 MB
Loading

docs/_static/logo_square.png

3.61 MB
Loading

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def setup(app):
162162
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
163163

164164
html_theme = "furo"
165+
html_logo = "_static/icon.png"
165166
html_static_path = ["_static"]
166167
html_css_files = [
167168
"custom.css",

pyathena/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _is_retryable(ex: BaseException) -> bool:
190190
max=config.max_delay,
191191
exp_base=config.exponential_base,
192192
),
193-
after=after_log(logger, logger.getEffectiveLevel()) if logger else None, # type: ignore
193+
after=after_log(logger, logger.level) if logger else None, # type: ignore
194194
reraise=True,
195195
)
196196
return retry(func, *args, **kwargs)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"python-dateutil",
1313
]
1414
requires-python = ">=3.10"
15-
readme = "README.rst"
15+
readme = "README.md"
1616
license = {file = "LICENSE"}
1717
classifiers = [
1818
"Development Status :: 4 - Beta",
@@ -90,7 +90,7 @@ only-include = [
9090
"pyathena/",
9191
"LICENSE",
9292
"pyproject.toml",
93-
"README.rst"
93+
"README.md"
9494
]
9595

9696
[tool.hatch.build.targets.wheel]

0 commit comments

Comments
 (0)