brk-code

PyAthena の API リファレンス

PyAthena (pyathena-dev/PyAthena) の公開 API 119 件 —— クラス 56、関数 10、メソッド 53。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: pyathena-dev/PyAthena

種別件数
クラス56
関数10
メソッド53

API 一覧

classpyathena.aio.connection.AioConnection
Async-aware connection to Amazon Athena.
methodpyathena.aio.connection.AioConnection.create(**kwargs:Any) -> AioConnection
Async factory for creating an ``AioConnection``.
classpyathena.aio.cursor.AioCursor
Native asyncio cursor for Amazon Athena.
methodpyathena.aio.cursor.AioCursor.fetchmany(size:int | None=None) -> list[Any | dict[Any, Any | None]]
Fetch multiple rows from a query result set.
methodpyathena.aio.cursor.AioCursor.fetchone() -> Any | dict[Any, Any | None] | None
Fetch the next row of a query result set.
classpyathena.aio.cursor.AioDictCursor
Native asyncio cursor that returns rows as dictionaries.
classpyathena.aio.result_set.AthenaAioDictResultSet
Async result set that returns rows as dictionaries.
classpyathena.aio.result_set.AthenaAioResultSet
Async result set that provides async fetch methods.
methodpyathena.aio.result_set.AthenaAioResultSet.fetchmany(size:int | None=None) -> list[tuple[Any | None, ...] | dict[Any, Any | None]]
Fetch multiple rows from the result set.
methodpyathena.aio.result_set.AthenaAioResultSet.fetchone() -> tuple[Any | None, ...] | dict[Any, Any | None] | None
Fetch the next row of the result set.
methodpyathena.aio.spark.cursor.AioSparkCursor.cancel() -> None
Cancel the currently running calculation.
methodpyathena.aio.spark.cursor.AioSparkCursor.close() -> None
Close the cursor by terminating the Spark session.
classpyathena.aio.sqlalchemy.base.AsyncAdapt_pyathena_connection
Wraps ``AioConnection`` with a sync DBAPI interface.
classpyathena.aio.sqlalchemy.base.AsyncAdapt_pyathena_dbapi
Fake DBAPI module for the async SQLAlchemy engine.
classpyathena.aio.sqlalchemy.base.AthenaAioDialect
Base async SQLAlchemy dialect for Amazon Athena.
funcpyathena.aio_connect(*args, **kwargs) -> AioConnection
Create a new async database connection to Amazon Athena.
classpyathena.arrow.converter.DefaultArrowUnloadTypeConverter
Type converter for Arrow UNLOAD operations.
funcpyathena.arrow.util.get_athena_type(type_:DataType) -> tuple[str, int, int]
Map a PyArrow data type to an Athena SQL type.
funcpyathena.arrow.util.to_column_info(schema:Schema) -> tuple[dict[str, Any], ...]
Convert a PyArrow schema to Athena column information.
methodpyathena.async_cursor.AsyncCursor.cancel(query_id:str) -> Future[None]
Cancel a running query asynchronously.
methodpyathena.async_cursor.AsyncCursor.poll(query_id:str) -> Future[AthenaQueryExecution]
Poll for query completion asynchronously.
methodpyathena.async_cursor.AsyncCursor.query_execution(query_id:str) -> Future[AthenaQueryExecution]
Get query execution details asynchronously.
classpyathena.common.BaseCursor
Abstract base class for all PyAthena cursor implementations.
methodpyathena.common.BaseCursor.get_default_converter(unload:bool=False) -> DefaultTypeConverter | Any
Get the default type converter for this cursor class.
methodpyathena.common.BaseCursor.setinputsizes(sizes)
Does nothing by default
methodpyathena.common.BaseCursor.setoutputsize(size, column=None)
Does nothing by default
classpyathena.connection.Connection
A DB API 2.0 compliant connection to Amazon Athena.
methodpyathena.connection.Connection.client() -> BaseClient
Get the boto3 Athena client used for query operations.
methodpyathena.connection.Connection.close() -> None
Close the connection.
methodpyathena.connection.Connection.commit() -> None
Commit any pending transaction.
methodpyathena.connection.Connection.retry_config() -> RetryConfig
Get the retry configuration for AWS API calls.
methodpyathena.connection.Connection.rollback() -> None
Rollback any pending transaction.
methodpyathena.connection.Connection.session() -> Session
Get the boto3 session used for AWS API calls.
methodpyathena.converter.Converter.get(type_:str) -> Callable[[str | None], Any | None]
Get the conversion function for a specific Athena data type.
methodpyathena.converter.Converter.get_dtype(type_:str, precision:int=0, scale:int=0) -> type[Any] | None
Get the data type for a given Athena type.
methodpyathena.converter.Converter.mappings() -> dict[str, Callable[[str | None], Any | None]]
Get the current type conversion mappings.
methodpyathena.converter.Converter.remove(type_:str) -> None
Remove a custom conversion function for an Athena data type.
methodpyathena.converter.Converter.set(type_:str, converter:Callable[[str | None], Any | None]) -> None
Set a custom conversion function for an Athena data type.
methodpyathena.converter.Converter.update(mappings:dict[str, Callable[[str | None], Any | None]]) -> None
Update multiple conversion functions at once.
classpyathena.error.DataError
Exception for errors due to invalid data.
classpyathena.error.DatabaseError
Base exception for database-related errors.
classpyathena.error.Error
Base exception class for all PyAthena errors.
classpyathena.error.IntegrityError
Exception for data integrity constraint violations.
classpyathena.error.InterfaceError
Exception for errors related to the database interface.
classpyathena.error.InternalError
Exception for internal database errors.
classpyathena.error.NotSupportedError
Exception for unsupported database operations.
classpyathena.error.OperationalError
Exception for errors during database operation processing.
classpyathena.error.ProgrammingError
Exception for programming errors in database operations.
classpyathena.error.Warning
Exception for non-fatal warnings.
methodpyathena.filesystem.s3.S3File.getxattr(xattr_name:str, **kwargs) -> str | None
Get an attribute from the user-defined metadata of the file.
methodpyathena.filesystem.s3.S3File.metadata(**kwargs) -> S3Metadata
Return the metadata of the file.
methodpyathena.filesystem.s3.S3File.setxattr(copy_kwargs:dict[str, Any] | None=None, **kwargs) -> None
Set the user-defined metadata of the file.
methodpyathena.filesystem.s3.S3FileSystem.checksum(path:str, **kwargs)
Get checksum for S3 object or directory.
methodpyathena.filesystem.s3.S3FileSystem.chmod(path:str, acl:str, recursive:bool=False, **kwargs) -> None
Set the Access Control on a bucket/key.
methodpyathena.filesystem.s3.S3FileSystem.clear_multipart_uploads(path:str) -> None
Abort any incomplete multipart uploads in the bucket.
methodpyathena.filesystem.s3.S3FileSystem.exists(path:str, **kwargs) -> bool
Check if an S3 path exists.
methodpyathena.filesystem.s3.S3FileSystem.find(path:str, maxdepth:int | None=None, withdirs:bool | None=None, detail:bool=False, **kwargs) -> dict[str, S3Object] | list[str]
Find all files below a given S3 path.
methodpyathena.filesystem.s3.S3FileSystem.get_tags(path:str) -> dict[str, str]
Retrieve the tag key/values for the given path.
methodpyathena.filesystem.s3.S3FileSystem.getxattr(path:str, attr_name:str, **kwargs) -> str | None
Get an attribute from the user-defined metadata of the path.
methodpyathena.filesystem.s3.S3FileSystem.ls(path:str, detail:bool=False, refresh:bool=False, **kwargs) -> list[S3Object] | list[str]
List contents of an S3 path.
methodpyathena.filesystem.s3.S3FileSystem.metadata(path:str, **kwargs) -> S3Metadata
Return the metadata of the path.
methodpyathena.filesystem.s3.S3FileSystem.mkdir(path:str, create_parents:bool=True, **kwargs) -> None
Create an S3 bucket.
methodpyathena.filesystem.s3.S3FileSystem.object_version_info(path:str, delete_markers:bool=False, **kwargs) -> list[S3ObjectVersion]
List the versions of the objects under the path.
methodpyathena.filesystem.s3.S3FileSystem.pipe_file(path:str, value:bytes | bytearray | memoryview, mode:str='overwrite', **kwargs) -> None
Write bytes into the path.
methodpyathena.filesystem.s3.S3FileSystem.put_file(lpath:str, rpath:str, callback=_DEFAULT_CALLBACK, **kwargs)
Upload a local file to S3.
methodpyathena.filesystem.s3.S3FileSystem.put_tags(path:str, tags:dict[str, str], mode:str='o') -> None
Set the tags for the given existing key.
methodpyathena.filesystem.s3.S3FileSystem.rmdir(path:str) -> None
Remove an S3 bucket, which must be empty.
methodpyathena.filesystem.s3.S3FileSystem.setxattr(path:str, copy_kwargs:dict[str, Any] | None=None, **kw_args) -> None
Set the user-defined metadata of the path.
classpyathena.filesystem.s3_async.AioS3File
Async-aware S3 file handle using ``S3AioExecutor``.
classpyathena.filesystem.s3_executor.S3AioExecutor
Executor that schedules work on an asyncio event loop.
classpyathena.filesystem.s3_executor.S3Executor
Abstract executor for parallel S3 operations.
methodpyathena.filesystem.s3_executor.S3Executor.shutdown(wait:bool=True) -> None
Shut down the executor, freeing any resources.
methodpyathena.filesystem.s3_executor.S3Executor.submit(fn:Callable[..., T], *args:Any, **kwargs:Any) -> Future[T]
Submit a callable for execution and return a Future.
classpyathena.filesystem.s3_executor.S3ThreadPoolExecutor
Executor that delegates to a ``ThreadPoolExecutor``.
classpyathena.filesystem.s3_object.S3MultipartUpload
Represents an S3 multipart upload operation.
methodpyathena.filesystem.s3_object.S3Object.to_dict() -> dict[str, Any]
Convert S3Object to dictionary representation.
classpyathena.filesystem.s3_object.S3ObjectType
Constants for S3 object types in filesystem operations.
classpyathena.filesystem.s3_object.S3PutObject
Represents the response from an S3 PUT object operation.
classpyathena.filesystem.s3_object.S3StorageClass
Constants for Amazon S3 storage classes.
classpyathena.model.AthenaCalculationExecutionStatus
Status information for an Athena calculation execution.
classpyathena.model.AthenaDatabase
Represents an Athena database (schema) and its metadata.
classpyathena.model.AthenaFileFormat
Constants and utilities for Athena supported file formats.
classpyathena.model.AthenaSessionStatus
Status information for an Athena interactive session.
classpyathena.model.AthenaTableMetadata
Represents comprehensive metadata for an Athena table.
classpyathena.model.AthenaTableMetadataColumn
Represents a column definition in an Athena table.
classpyathena.pandas.converter.DefaultPandasUnloadTypeConverter
Type converter for pandas UNLOAD operations.
funcpyathena.pandas.util.as_pandas(cursor:Cursor, coerce_float:bool=False) -> DataFrame
Convert cursor results to a pandas DataFrame.
funcpyathena.pandas.util.get_chunks(df:DataFrame, chunksize:int | None=None) -> Iterator[DataFrame]
Split a DataFrame into chunks of specified size.
funcpyathena.pandas.util.reset_index(df:DataFrame, index_label:str | None=None) -> None
Reset the DataFrame index and add it as a column.
funcpyathena.pandas.util.to_sql_type_mappings(col:Series) -> str
Map a pandas Series data type to an Athena SQL type.
classpyathena.parser.TypeNode
Parsed representation of an Athena DDL type signature.
methodpyathena.parser.TypeNode.get_field_type(name:str) -> TypeNode | None
Look up a child type node by field name using a cached dict.
classpyathena.parser.TypeSignatureParser
Parse Athena DDL type signature strings into a type tree.
methodpyathena.parser.TypeSignatureParser.parse(type_str:str) -> TypeNode
Parse an Athena DDL type signature string into a TypeNode tree.
classpyathena.parser.TypedValueConverter
Convert values using TypeNode type information.
methodpyathena.parser.TypedValueConverter.convert(value:str, type_node:TypeNode) -> Any
Convert a value using type information from a TypeNode.
methodpyathena.polars.converter.DefaultPolarsTypeConverter.get_dtype(type_:str, precision:int=0, scale:int=0) -> Any
Get the Polars data type for a given Athena type.
classpyathena.polars.converter.DefaultPolarsUnloadTypeConverter
Type converter for Polars UNLOAD operations.
funcpyathena.polars.util.get_athena_type(dtype:Any) -> tuple[str, int, int]
Map a Polars data type to an Athena SQL type.
funcpyathena.polars.util.to_column_info(schema:pl.Schema) -> tuple[dict[str, Any], ...]
Convert a Polars schema to Athena column information.
classpyathena.s3fs.converter.DefaultS3FSTypeConverter
Type converter for S3FS Cursor results.
methodpyathena.s3fs.reader.AthenaCSVReader.close() -> None
Close the underlying file object.
classpyathena.s3fs.reader.DefaultCSVReader
CSV reader using Python's standard csv module.
methodpyathena.s3fs.reader.DefaultCSVReader.close() -> None
Close the underlying file object.
classpyathena.sqlalchemy.base.AthenaDialect
SQLAlchemy dialect for Amazon Athena.
classpyathena.sqlalchemy.compiler.AthenaStatementCompiler
SQL statement compiler for Amazon Athena queries.
classpyathena.sqlalchemy.compiler.AthenaTypeCompiler
Type compiler for Amazon Athena SQL types.
classpyathena.sqlalchemy.s3fs.AthenaS3FSDialect
SQLAlchemy dialect for PyAthena with S3FS cursor.
classpyathena.sqlalchemy.types.ARRAY
Uppercase alias for AthenaArray type.
classpyathena.sqlalchemy.types.AthenaArray
SQLAlchemy type for Athena ARRAY complex type.
classpyathena.sqlalchemy.types.AthenaDate
SQLAlchemy type for Athena DATE values.
classpyathena.sqlalchemy.types.AthenaMap
SQLAlchemy type for Athena MAP complex type.
classpyathena.sqlalchemy.types.AthenaStruct
SQLAlchemy type for Athena STRUCT/ROW complex type.
classpyathena.sqlalchemy.types.AthenaTimestamp
SQLAlchemy type for Athena TIMESTAMP values.
classpyathena.sqlalchemy.types.MAP
Uppercase alias for AthenaMap type.
classpyathena.sqlalchemy.types.STRUCT
Uppercase alias for AthenaStruct type.
classpyathena.sqlalchemy.types.TINYINT
Uppercase alias for Tinyint type.
classpyathena.sqlalchemy.types.Tinyint
SQLAlchemy type for Athena TINYINT (8-bit signed integer).
funcpyathena.util.parse_output_location(output_location:str) -> tuple[str, str]
Parse an S3 output location URL into bucket and key components.

この情報について

掲載しているシグネチャは pyathena-dev/PyAthena の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る