Initializing...

API Reference

Complete reference for the tubox_client package.

Configuration

class ClientConfig

Container for client connection settings.

__init__(host: str, port: int, max_pool_size: int = 10, ...)
  • host: Server hostname
  • port: Server port (default 7188)
  • connect_timeout: Max time (s) to wait for connection

Client

class TuboxClient

Main entry point for the SDK.

connect() -> bool

Establishes connection pool to the server.

authenticate(username: str, password: str) -> bool

Authenticates user and retrieves session token.

Raises: AuthenticationError

database(name: str) -> TuboxAPIDatabase

Get a database reference.

start_session(timeout_seconds: int = 3600) -> ClientSession

Start a new session for transactions.

Collection

class TuboxAPICollection

insert_one(document: Dict, session=None) -> OperationResult

Insert a single document.

find(query: Dict, limit: int = 0, ...) -> OperationResult

Find documents matching query.

update_one(query: Dict, update: Dict, ...) -> OperationResult

Update first matching document.

Last updated: Dec 14, 2025