Skip to content

Commit 87c4cca

Browse files
Merge pull request #601 from laughingman7743/add-comprehensive-docstrings
2 parents 95c9f51 + ccd2507 commit 87c4cca

36 files changed

Lines changed: 2358 additions & 8 deletions

docs/api.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _api:
2+
3+
API Reference
4+
=============
5+
6+
This section provides comprehensive API documentation for all PyAthena classes and functions, organized by functionality.
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:caption: API Documentation:
11+
12+
api/connection
13+
api/pandas
14+
api/arrow
15+
api/spark
16+
api/converters
17+
api/filesystem
18+
api/models
19+
api/utilities
20+
api/errors
21+
22+
Quick Reference
23+
---------------
24+
25+
Core Functionality
26+
~~~~~~~~~~~~~~~~~~
27+
28+
- :ref:`api_connection` - Connection management and basic cursors
29+
- :ref:`api_converters` - Data type conversion and parameter formatting
30+
- :ref:`api_utilities` - Utility functions and base classes
31+
- :ref:`api_errors` - Exception handling and error classes
32+
33+
Specialized Integrations
34+
~~~~~~~~~~~~~~~~~~~~~~~~
35+
36+
- :ref:`api_pandas` - pandas DataFrame integration
37+
- :ref:`api_arrow` - Apache Arrow columnar data integration
38+
- :ref:`api_spark` - Apache Spark integration for big data processing
39+
40+
Infrastructure
41+
~~~~~~~~~~~~~~~
42+
43+
- :ref:`api_filesystem` - S3 filesystem integration and object management
44+
- :ref:`api_models` - Athena query execution and metadata models

docs/api/arrow.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _api_arrow:
2+
3+
Apache Arrow Integration
4+
========================
5+
6+
This section covers Apache Arrow-specific cursors and data converters.
7+
8+
Arrow Cursors
9+
-------------
10+
11+
.. autoclass:: pyathena.arrow.cursor.ArrowCursor
12+
:members:
13+
:inherited-members:
14+
15+
.. autoclass:: pyathena.arrow.async_cursor.AsyncArrowCursor
16+
:members:
17+
:inherited-members:
18+
19+
Arrow Data Converters
20+
----------------------
21+
22+
.. autoclass:: pyathena.arrow.converter.DefaultArrowTypeConverter
23+
:members:
24+
25+
.. autoclass:: pyathena.arrow.converter.DefaultArrowUnloadTypeConverter
26+
:members:

docs/api/connection.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.. _api_connection:
2+
3+
Connection and Cursors
4+
======================
5+
6+
This section covers the core connection functionality and basic cursor operations.
7+
8+
Connection
9+
----------
10+
11+
.. automodule:: pyathena
12+
:members: connect
13+
14+
.. autoclass:: pyathena.connection.Connection
15+
:members:
16+
:inherited-members:
17+
18+
Standard Cursors
19+
----------------
20+
21+
.. autoclass:: pyathena.cursor.Cursor
22+
:members:
23+
:inherited-members:
24+
25+
.. autoclass:: pyathena.cursor.DictCursor
26+
:members:
27+
:inherited-members:
28+
29+
Asynchronous Cursors
30+
--------------------
31+
32+
.. autoclass:: pyathena.async_cursor.AsyncCursor
33+
:members:
34+
:inherited-members:
35+
36+
.. autoclass:: pyathena.async_cursor.AsyncDictCursor
37+
:members:
38+
:inherited-members:

docs/api/converters.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _api_converters:
2+
3+
Data Conversion
4+
===============
5+
6+
This section covers data type converters and parameter formatters.
7+
8+
Type Converters
9+
---------------
10+
11+
.. autoclass:: pyathena.converter.Converter
12+
:members:
13+
14+
.. autoclass:: pyathena.converter.DefaultTypeConverter
15+
:members:
16+
17+
Parameter Formatters
18+
--------------------
19+
20+
.. autoclass:: pyathena.formatter.Formatter
21+
:members:
22+
23+
.. autoclass:: pyathena.formatter.DefaultParameterFormatter
24+
:members:

docs/api/errors.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.. _api_errors:
2+
3+
Exception Handling
4+
==================
5+
6+
This section covers all PyAthena exception classes and error handling.
7+
8+
Exception Hierarchy
9+
--------------------
10+
11+
.. automodule:: pyathena.error
12+
:members:
13+
:show-inheritance:
14+
15+
Base Exceptions
16+
---------------
17+
18+
.. autoclass:: pyathena.error.Error
19+
:members:
20+
21+
.. autoclass:: pyathena.error.Warning
22+
:members:
23+
24+
Interface Errors
25+
-----------------
26+
27+
.. autoclass:: pyathena.error.InterfaceError
28+
:members:
29+
30+
.. autoclass:: pyathena.error.DatabaseError
31+
:members:
32+
33+
Data Errors
34+
-----------
35+
36+
.. autoclass:: pyathena.error.DataError
37+
:members:
38+
39+
.. autoclass:: pyathena.error.IntegrityError
40+
:members:
41+
42+
.. autoclass:: pyathena.error.InternalError
43+
:members:
44+
45+
Operational Errors
46+
------------------
47+
48+
.. autoclass:: pyathena.error.OperationalError
49+
:members:
50+
51+
.. autoclass:: pyathena.error.ProgrammingError
52+
:members:
53+
54+
.. autoclass:: pyathena.error.NotSupportedError
55+
:members:

docs/api/filesystem.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. _api_filesystem:
2+
3+
File System Integration
4+
=======================
5+
6+
This section covers S3 filesystem integration and object management.
7+
8+
S3 FileSystem
9+
-------------
10+
11+
.. autoclass:: pyathena.filesystem.s3.S3FileSystem
12+
:members:
13+
14+
S3 Objects
15+
----------
16+
17+
.. autoclass:: pyathena.filesystem.s3_object.S3Object
18+
:members:
19+
20+
.. autoclass:: pyathena.filesystem.s3_object.S3ObjectType
21+
:members:
22+
23+
.. autoclass:: pyathena.filesystem.s3_object.S3StorageClass
24+
:members:
25+
26+
S3 Upload Operations
27+
--------------------
28+
29+
.. autoclass:: pyathena.filesystem.s3_object.S3PutObject
30+
:members:
31+
32+
.. autoclass:: pyathena.filesystem.s3_object.S3MultipartUpload
33+
:members:
34+
35+
.. autoclass:: pyathena.filesystem.s3_object.S3MultipartUploadPart
36+
:members:
37+
38+
.. autoclass:: pyathena.filesystem.s3_object.S3CompleteMultipartUpload
39+
:members:

docs/api/models.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. _api_models:
2+
3+
Data Models
4+
===========
5+
6+
This section covers Athena query execution models and configuration classes.
7+
8+
Query Execution
9+
----------------
10+
11+
.. autoclass:: pyathena.model.AthenaQueryExecution
12+
:members:
13+
14+
.. autoclass:: pyathena.model.AthenaCalculationExecution
15+
:members:
16+
17+
.. autoclass:: pyathena.model.AthenaCalculationExecutionStatus
18+
:members:
19+
20+
Session Management
21+
------------------
22+
23+
.. autoclass:: pyathena.model.AthenaSessionStatus
24+
:members:
25+
26+
Database and Table Metadata
27+
----------------------------
28+
29+
.. autoclass:: pyathena.model.AthenaDatabase
30+
:members:
31+
32+
.. autoclass:: pyathena.model.AthenaTableMetadata
33+
:members:
34+
35+
File Formats and Compression
36+
-----------------------------
37+
38+
.. autoclass:: pyathena.model.AthenaFileFormat
39+
:members:
40+
41+
.. autoclass:: pyathena.model.AthenaCompression
42+
:members:

docs/api/pandas.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _api_pandas:
2+
3+
Pandas Integration
4+
==================
5+
6+
This section covers pandas-specific cursors and data converters.
7+
8+
Pandas Cursors
9+
--------------
10+
11+
.. autoclass:: pyathena.pandas.cursor.PandasCursor
12+
:members:
13+
:inherited-members:
14+
15+
.. autoclass:: pyathena.pandas.async_cursor.AsyncPandasCursor
16+
:members:
17+
:inherited-members:
18+
19+
Pandas Data Converters
20+
-----------------------
21+
22+
.. autoclass:: pyathena.pandas.converter.DefaultPandasTypeConverter
23+
:members:
24+
25+
.. autoclass:: pyathena.pandas.converter.DefaultPandasUnloadTypeConverter
26+
:members:

docs/api/spark.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _api_spark:
2+
3+
Spark Integration
4+
=================
5+
6+
This section covers Apache Spark-specific cursors and execution management.
7+
8+
Spark Cursors
9+
-------------
10+
11+
.. autoclass:: pyathena.spark.cursor.SparkCursor
12+
:members:
13+
:inherited-members:
14+
15+
.. autoclass:: pyathena.spark.async_cursor.AsyncSparkCursor
16+
:members:
17+
:inherited-members:
18+
19+
Spark Base Classes
20+
------------------
21+
22+
.. autoclass:: pyathena.spark.common.SparkBaseCursor
23+
:members:
24+
:inherited-members:
25+
26+
.. autoclass:: pyathena.spark.common.WithCalculationExecution
27+
:members:
28+
:inherited-members:

docs/api/utilities.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _api_utilities:
2+
3+
Utilities and Configuration
4+
===========================
5+
6+
This section covers utility functions, retry configuration, and helper classes.
7+
8+
Retry Configuration
9+
-------------------
10+
11+
.. autoclass:: pyathena.util.RetryConfig
12+
:members:
13+
14+
Utility Functions
15+
-----------------
16+
17+
.. autofunction:: pyathena.util.retry_api_call
18+
19+
.. autofunction:: pyathena.util.parse_output_location
20+
21+
.. autofunction:: pyathena.util.strtobool
22+
23+
Common Base Classes
24+
-------------------
25+
26+
.. autoclass:: pyathena.common.CursorIterator
27+
:members:
28+
29+
.. autoclass:: pyathena.common.BaseCursor
30+
:members:

0 commit comments

Comments
 (0)