# ruff: noqa: F401, I001, E402
__version__: str

import pyarrow.lib as _lib

_gc_enabled: bool

from pyarrow.lib import (
    BuildInfo,
    RuntimeInfo,
    set_timezone_db_path,
    MonthDayNano,
    VersionInfo,
    cpp_build_info,
    cpp_version,
    cpp_version_info,
    runtime_info,
    cpu_count,
    set_cpu_count,
    enable_signal_handlers,
    io_thread_count,
    set_io_thread_count,
)

def show_versions() -> None: ...
def show_info() -> None: ...
def _module_is_available(module: str) -> bool: ...
def _filesystem_is_available(fs: str) -> bool: ...

from pyarrow.lib import (
    null,
    bool_,
    int8,
    int16,
    int32,
    int64,
    uint8,
    uint16,
    uint32,
    uint64,
    time32,
    time64,
    timestamp,
    date32,
    date64,
    duration,
    month_day_nano_interval,
    float16,
    float32,
    float64,
    binary,
    string,
    utf8,
    binary_view,
    string_view,
    large_binary,
    large_string,
    large_utf8,
    decimal128,
    decimal256,
    list_,
    large_list,
    list_view,
    large_list_view,
    map_,
    struct,
    union,
    sparse_union,
    dense_union,
    dictionary,
    run_end_encoded,
    fixed_shape_tensor,
    field,
    type_for_alias,
    DataType,
    DictionaryType,
    StructType,
    ListType,
    LargeListType,
    FixedSizeListType,
    ListViewType,
    LargeListViewType,
    MapType,
    UnionType,
    SparseUnionType,
    DenseUnionType,
    TimestampType,
    Time32Type,
    Time64Type,
    DurationType,
    FixedSizeBinaryType,
    Decimal128Type,
    Decimal256Type,
    BaseExtensionType,
    ExtensionType,
    RunEndEncodedType,
    FixedShapeTensorType,
    PyExtensionType,
    UnknownExtensionType,
    register_extension_type,
    unregister_extension_type,
    DictionaryMemo,
    KeyValueMetadata,
    Field,
    Schema,
    schema,
    unify_schemas,
    Array,
    Tensor,
    array,
    chunked_array,
    record_batch,
    nulls,
    repeat,
    SparseCOOTensor,
    SparseCSRMatrix,
    SparseCSCMatrix,
    SparseCSFTensor,
    infer_type,
    from_numpy_dtype,
    NullArray,
    NumericArray,
    IntegerArray,
    FloatingPointArray,
    BooleanArray,
    Int8Array,
    UInt8Array,
    Int16Array,
    UInt16Array,
    Int32Array,
    UInt32Array,
    Int64Array,
    UInt64Array,
    HalfFloatArray,
    FloatArray,
    DoubleArray,
    ListArray,
    LargeListArray,
    FixedSizeListArray,
    ListViewArray,
    LargeListViewArray,
    MapArray,
    UnionArray,
    BinaryArray,
    StringArray,
    LargeBinaryArray,
    LargeStringArray,
    BinaryViewArray,
    StringViewArray,
    FixedSizeBinaryArray,
    DictionaryArray,
    Date32Array,
    Date64Array,
    TimestampArray,
    Time32Array,
    Time64Array,
    DurationArray,
    MonthDayNanoIntervalArray,
    Decimal128Array,
    Decimal256Array,
    StructArray,
    ExtensionArray,
    RunEndEncodedArray,
    FixedShapeTensorArray,
    scalar,
    NA,
    _NULL as NULL,
    Scalar,
    NullScalar,
    BooleanScalar,
    Int8Scalar,
    Int16Scalar,
    Int32Scalar,
    Int64Scalar,
    UInt8Scalar,
    UInt16Scalar,
    UInt32Scalar,
    UInt64Scalar,
    HalfFloatScalar,
    FloatScalar,
    DoubleScalar,
    Decimal128Scalar,
    Decimal256Scalar,
    ListScalar,
    LargeListScalar,
    FixedSizeListScalar,
    ListViewScalar,
    LargeListViewScalar,
    Date32Scalar,
    Date64Scalar,
    Time32Scalar,
    Time64Scalar,
    TimestampScalar,
    DurationScalar,
    MonthDayNanoIntervalScalar,
    BinaryScalar,
    LargeBinaryScalar,
    BinaryViewScalar,
    StringScalar,
    LargeStringScalar,
    StringViewScalar,
    FixedSizeBinaryScalar,
    DictionaryScalar,
    MapScalar,
    StructScalar,
    UnionScalar,
    RunEndEncodedScalar,
    ExtensionScalar,
)

# Buffers, allocation
from pyarrow.lib import DeviceAllocationType, Device, MemoryManager, default_cpu_memory_manager

from pyarrow.lib import (
    Buffer,
    ResizableBuffer,
    foreign_buffer,
    py_buffer,
    Codec,
    compress,
    decompress,
    allocate_buffer,
)

from pyarrow.lib import (
    MemoryPool,
    LoggingMemoryPool,
    ProxyMemoryPool,
    total_allocated_bytes,
    set_memory_pool,
    default_memory_pool,
    system_memory_pool,
    jemalloc_memory_pool,
    mimalloc_memory_pool,
    logging_memory_pool,
    proxy_memory_pool,
    log_memory_allocations,
    jemalloc_set_decay_ms,
    supported_memory_backends,
)

# I/O
from pyarrow.lib import (
    NativeFile,
    PythonFile,
    BufferedInputStream,
    BufferedOutputStream,
    CacheOptions,
    CompressedInputStream,
    CompressedOutputStream,
    TransformInputStream,
    transcoding_input_stream,
    FixedSizeBufferWriter,
    BufferReader,
    BufferOutputStream,
    OSFile,
    MemoryMappedFile,
    memory_map,
    create_memory_map,
    MockOutputStream,
    input_stream,
    output_stream,
    have_libhdfs,
)

from pyarrow.lib import (
    ChunkedArray,
    RecordBatch,
    Table,
    table,
    concat_arrays,
    concat_tables,
    TableGroupBy,
    RecordBatchReader,
)

# Exceptions
from pyarrow.lib import (
    ArrowCancelled,
    ArrowCapacityError,
    ArrowException,
    ArrowKeyError,
    ArrowIndexError,
    ArrowInvalid,
    ArrowIOError,
    ArrowMemoryError,
    ArrowNotImplementedError,
    ArrowTypeError,
    ArrowSerializationError,
)

from pyarrow.ipc import serialize_pandas, deserialize_pandas
import pyarrow.ipc as ipc

import pyarrow.types as types

# ----------------------------------------------------------------------
# Deprecations

from pyarrow.util import _deprecate_api, _deprecate_class

from pyarrow.ipc import (
    Message,
    MessageReader,
    MetadataVersion,
    RecordBatchFileReader,
    RecordBatchFileWriter,
    RecordBatchStreamReader,
    RecordBatchStreamWriter,
)

# ----------------------------------------------------------------------
# Returning absolute path to the pyarrow include directory (if bundled, e.g. in
# wheels)
def get_include() -> str: ...
def _get_pkg_config_executable() -> str: ...
def _has_pkg_config(pkgname: str) -> bool: ...
def _read_pkg_config_variable(pkgname: str, cli_args: list[str]) -> str: ...
def get_libraries() -> list[str]: ...
def create_library_symlinks() -> None: ...
def get_library_dirs() -> list[str]: ...

__all__ = [
    "__version__",
    "_lib",
    "_gc_enabled",
    "BuildInfo",
    "RuntimeInfo",
    "set_timezone_db_path",
    "MonthDayNano",
    "VersionInfo",
    "cpp_build_info",
    "cpp_version",
    "cpp_version_info",
    "runtime_info",
    "cpu_count",
    "set_cpu_count",
    "enable_signal_handlers",
    "io_thread_count",
    "set_io_thread_count",
    "show_versions",
    "show_info",
    "_module_is_available",
    "_filesystem_is_available",
    "null",
    "bool_",
    "int8",
    "int16",
    "int32",
    "int64",
    "uint8",
    "uint16",
    "uint32",
    "uint64",
    "time32",
    "time64",
    "timestamp",
    "date32",
    "date64",
    "duration",
    "month_day_nano_interval",
    "float16",
    "float32",
    "float64",
    "binary",
    "string",
    "utf8",
    "binary_view",
    "string_view",
    "large_binary",
    "large_string",
    "large_utf8",
    "decimal128",
    "decimal256",
    "list_",
    "large_list",
    "list_view",
    "large_list_view",
    "map_",
    "struct",
    "union",
    "sparse_union",
    "dense_union",
    "dictionary",
    "run_end_encoded",
    "fixed_shape_tensor",
    "field",
    "type_for_alias",
    "DataType",
    "DictionaryType",
    "StructType",
    "ListType",
    "LargeListType",
    "FixedSizeListType",
    "ListViewType",
    "LargeListViewType",
    "MapType",
    "UnionType",
    "SparseUnionType",
    "DenseUnionType",
    "TimestampType",
    "Time32Type",
    "Time64Type",
    "DurationType",
    "FixedSizeBinaryType",
    "Decimal128Type",
    "Decimal256Type",
    "BaseExtensionType",
    "ExtensionType",
    "RunEndEncodedType",
    "FixedShapeTensorType",
    "PyExtensionType",
    "UnknownExtensionType",
    "register_extension_type",
    "unregister_extension_type",
    "DictionaryMemo",
    "KeyValueMetadata",
    "Field",
    "Schema",
    "schema",
    "unify_schemas",
    "Array",
    "Tensor",
    "array",
    "chunked_array",
    "record_batch",
    "nulls",
    "repeat",
    "SparseCOOTensor",
    "SparseCSRMatrix",
    "SparseCSCMatrix",
    "SparseCSFTensor",
    "infer_type",
    "from_numpy_dtype",
    "NullArray",
    "NumericArray",
    "IntegerArray",
    "FloatingPointArray",
    "BooleanArray",
    "Int8Array",
    "UInt8Array",
    "Int16Array",
    "UInt16Array",
    "Int32Array",
    "UInt32Array",
    "Int64Array",
    "UInt64Array",
    "HalfFloatArray",
    "FloatArray",
    "DoubleArray",
    "ListArray",
    "LargeListArray",
    "FixedSizeListArray",
    "ListViewArray",
    "LargeListViewArray",
    "MapArray",
    "UnionArray",
    "BinaryArray",
    "StringArray",
    "LargeBinaryArray",
    "LargeStringArray",
    "BinaryViewArray",
    "StringViewArray",
    "FixedSizeBinaryArray",
    "DictionaryArray",
    "Date32Array",
    "Date64Array",
    "TimestampArray",
    "Time32Array",
    "Time64Array",
    "DurationArray",
    "MonthDayNanoIntervalArray",
    "Decimal128Array",
    "Decimal256Array",
    "StructArray",
    "ExtensionArray",
    "RunEndEncodedArray",
    "FixedShapeTensorArray",
    "scalar",
    "NA",
    "NULL",
    "Scalar",
    "NullScalar",
    "BooleanScalar",
    "Int8Scalar",
    "Int16Scalar",
    "Int32Scalar",
    "Int64Scalar",
    "UInt8Scalar",
    "UInt16Scalar",
    "UInt32Scalar",
    "UInt64Scalar",
    "HalfFloatScalar",
    "FloatScalar",
    "DoubleScalar",
    "Decimal128Scalar",
    "Decimal256Scalar",
    "ListScalar",
    "LargeListScalar",
    "FixedSizeListScalar",
    "ListViewScalar",
    "LargeListViewScalar",
    "Date32Scalar",
    "Date64Scalar",
    "Time32Scalar",
    "Time64Scalar",
    "TimestampScalar",
    "DurationScalar",
    "MonthDayNanoIntervalScalar",
    "BinaryScalar",
    "LargeBinaryScalar",
    "BinaryViewScalar",
    "StringScalar",
    "LargeStringScalar",
    "StringViewScalar",
    "FixedSizeBinaryScalar",
    "DictionaryScalar",
    "MapScalar",
    "StructScalar",
    "UnionScalar",
    "RunEndEncodedScalar",
    "ExtensionScalar",
    "DeviceAllocationType",
    "Device",
    "MemoryManager",
    "default_cpu_memory_manager",
    "Buffer",
    "ResizableBuffer",
    "foreign_buffer",
    "py_buffer",
    "Codec",
    "compress",
    "decompress",
    "allocate_buffer",
    "MemoryPool",
    "LoggingMemoryPool",
    "ProxyMemoryPool",
    "total_allocated_bytes",
    "set_memory_pool",
    "default_memory_pool",
    "system_memory_pool",
    "jemalloc_memory_pool",
    "mimalloc_memory_pool",
    "logging_memory_pool",
    "proxy_memory_pool",
    "log_memory_allocations",
    "jemalloc_set_decay_ms",
    "supported_memory_backends",
    "NativeFile",
    "PythonFile",
    "BufferedInputStream",
    "BufferedOutputStream",
    "CacheOptions",
    "CompressedInputStream",
    "CompressedOutputStream",
    "TransformInputStream",
    "transcoding_input_stream",
    "FixedSizeBufferWriter",
    "BufferReader",
    "BufferOutputStream",
    "OSFile",
    "MemoryMappedFile",
    "memory_map",
    "create_memory_map",
    "MockOutputStream",
    "input_stream",
    "output_stream",
    "have_libhdfs",
    "ChunkedArray",
    "RecordBatch",
    "Table",
    "table",
    "concat_arrays",
    "concat_tables",
    "TableGroupBy",
    "RecordBatchReader",
    "ArrowCancelled",
    "ArrowCapacityError",
    "ArrowException",
    "ArrowKeyError",
    "ArrowIndexError",
    "ArrowInvalid",
    "ArrowIOError",
    "ArrowMemoryError",
    "ArrowNotImplementedError",
    "ArrowTypeError",
    "ArrowSerializationError",
    "serialize_pandas",
    "deserialize_pandas",
    "ipc",
    "types",
    "_deprecate_api",
    "_deprecate_class",
    "Message",
    "MessageReader",
    "MetadataVersion",
    "RecordBatchFileReader",
    "RecordBatchFileWriter",
    "RecordBatchStreamReader",
    "RecordBatchStreamWriter",
    "get_include",
    "_get_pkg_config_executable",
    "_has_pkg_config",
    "_read_pkg_config_variable",
    "get_libraries",
    "create_library_symlinks",
    "get_library_dirs",
]
