Skip to content

Commit 67b4127

Browse files
Improve index page with Quick Start and dropdown TOC navigation
- Add sphinx-design dependency for dropdown directive support - Add Quick Start section with install command and example code - Organize toctree into categorized dropdown sections: Getting Started, Cursors, Integrations, Advanced Topics, API Reference - Sidebar now shows grouped navigation with section headings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d2d40f0 commit 67b4127

File tree

4 files changed

+103
-3
lines changed

4 files changed

+103
-3
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def setup(app):
117117
"sphinx.ext.githubpages",
118118
"sphinx_multiversion",
119119
"sphinxext.opengraph",
120+
"sphinx_design",
120121
]
121122

122123
try:

docs/index.md

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,86 @@
44

55
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).
66

7+
## Quick Start
8+
9+
```bash
10+
pip install PyAthena
11+
```
12+
13+
```python
14+
from pyathena import connect
15+
16+
cursor = connect(
17+
s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
18+
region_name="us-west-2"
19+
).cursor()
20+
21+
cursor.execute("SELECT 1")
22+
print(cursor.fetchone())
23+
```
24+
725
(documentation)=
826

927
## Documentation
1028

29+
:::{dropdown} Getting Started
30+
1131
```{toctree}
1232
:maxdepth: 2
13-
:caption: Contents:
33+
:caption: Getting Started
1434
1535
introduction
1636
usage
37+
```
38+
39+
:::
40+
41+
:::{dropdown} Cursors
42+
43+
```{toctree}
44+
:maxdepth: 2
45+
:caption: Cursors
46+
1747
cursor
18-
null_handling
19-
sqlalchemy
2048
pandas
2149
arrow
2250
polars
2351
s3fs
2452
spark
53+
```
54+
55+
:::
56+
57+
:::{dropdown} Integrations
58+
59+
```{toctree}
60+
:maxdepth: 2
61+
:caption: Integrations
62+
63+
sqlalchemy
64+
```
65+
66+
:::
67+
68+
:::{dropdown} Advanced Topics
69+
70+
```{toctree}
71+
:maxdepth: 2
72+
:caption: Advanced Topics
73+
74+
null_handling
2575
testing
76+
```
77+
78+
:::
79+
80+
:::{dropdown} API Reference
81+
82+
```{toctree}
83+
:maxdepth: 2
84+
:caption: API Reference
85+
2686
api
2787
```
88+
89+
:::

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ dev = [
7676
"sphinxext-opengraph",
7777
"furo",
7878
"myst-parser",
79+
"sphinx-design",
7980
"types-python-dateutil",
8081
]
8182

uv.lock

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)