API Reference

The Aerospike Python SDK is organized into three layers:

Async API

The primary API. All operations are async/await.

Class

Description

Client

Entry point — connect, create sessions, manage lifecycle

Cluster

Cluster handle returned by Client

Session

Scoped reads and writes with a fixed Behavior

QueryBuilder

Build and execute read queries (point, set, batch)

WriteSegmentBuilder

Build and execute writes (upsert, insert, update, replace, delete)

CdtReadBuilder

Read operations on list and map CDTs

CdtWriteBuilder

Write operations on list and map CDTs

BatchOperationBuilder

Low-level batch operation builder

IndexBuilder

Create and drop secondary indexes

BackgroundTaskSession

Server-side background jobs (update, delete, touch, UDF)

UdfFunctionBuilder

Foreground UDF execution

InfoCommands

Aerospike info protocol commands

TransactionalSession

Multi-record transactions

Sync API

Synchronous wrappers for the async API. Same functionality, no async/await.

Class

Description

SyncClient

Sync entry point

Cluster

Sync cluster handle

SyncSession

Sync session

SyncQueryBuilder

Sync query builder

SyncWriteSegmentBuilder

Sync write builder (upsert, insert, update, replace, delete)

SyncBatchOperationBuilder

Sync batch operation builder

SyncIndexBuilder

Sync secondary index builder

SyncBackgroundTaskSession

Sync server-side background jobs

SyncUdfFunctionBuilder

Sync foreground UDF execution

SyncInfoCommands

Sync info protocol commands

SyncTransactionalSession

Sync multi-record transactions

SyncRecordStream

Sync iterator over query results

ClusterDefinition

Sync cluster connection configuration

TlsBuilder

Sync TLS configuration builder

Core

Shared types used by both async and sync APIs.

Class

Description

DataSet

Namespace + set pair, key factory

RecordResult

Single result from a query or batch

RecordStream

Async iterator over query results

Behavior

Policy presets (timeouts, consistency)

ClusterDefinition

Cluster connection configuration

TlsBuilder

TLS configuration builder

SystemSettings

Global system-level tunables

ErrorStrategy

Error handling strategies

Exceptions

Exception hierarchy

QueryHint

Query optimization hints

IndexesMonitor

Background secondary index discovery

AEL

Aerospike Expression Language parsing and filter generation.

Class / Function

Description

parse_ael

Parse AEL strings into filter expressions

FilterGenerator

Secondary index filter generation

Exp

Programmatic expression builder