from typing import Any, Optional

def setup(config: Any) -> None: ...
def shutdown() -> None: ...
def get_setup_status() -> bool: ...
def setenv(env_obj: Any) -> None: ...
def encrypt_bytes(partition_id: str, data: bytes) -> str: ...
def encrypt_string(partition_id: str, text: str) -> str: ...
def decrypt_bytes(partition_id: str, data_row_record: str) -> bytes: ...
def decrypt_string(partition_id: str, data_row_record: str) -> str: ...
def set_metrics_hook(callback: Optional[Any] = ...) -> None: ...
def set_log_hook(callback: Optional[Any] = ...) -> None: ...
def version() -> str: ...

class SessionFactory:
    def __init__(self) -> None: ...
    @staticmethod
    def from_env() -> SessionFactory: ...
    def get_session(self, partition_id: str) -> Session: ...
    def close(self) -> None: ...
    def __enter__(self) -> SessionFactory: ...
    def __exit__(
        self,
        ty: Optional[type] = ...,
        value: Optional[BaseException] = ...,
        tb: Optional[Any] = ...,
    ) -> None: ...

class Session:
    def encrypt_bytes(self, data: bytes) -> str: ...
    def encrypt_text(self, text: str) -> str: ...
    def decrypt_bytes(self, data_row_record: str) -> bytes: ...
    def decrypt_text(self, data_row_record: str) -> str: ...
    def close(self) -> None: ...
    def __enter__(self) -> Session: ...
    def __exit__(
        self,
        ty: Optional[type] = ...,
        value: Optional[BaseException] = ...,
        tb: Optional[Any] = ...,
    ) -> None: ...
