Introduction

The Aerospike Python client enables you to build an application in Python with an Aerospike cluster as its database. The client manages the connections to the cluster and handles the transactions performed against it.

The Python client is a CPython module built on the Aerospike C client.

Data Model

At the top is the namespace, a container that has one set of policy rules for all its data, and is similar to the database concept in an RDBMS, only distributed across the cluster. A namespace is subdivided into sets, similar to tables.

Pairs of key-value data called bins make up records, similar to columns of a row in a standard RDBMS. Aerospike is schema-less, meaning that you do not need to define your bins in advance.

Records are uniquely identified by their key, and record metadata is contained in an in-memory primary index.

See also

Architecture Overview and Aerospike Data Model for more information about Aerospike.

Layout

  • aerospike
    • Constructors for the Client and GeoJSON classes

    • Server-side types

    • Serialization

    • Logging

    • Helper function for calculating key digest

    • Constants

  • aerospike.predicates
    • Query predicates

  • aerospike.exception
    • All exception classes

    • Exception hierarchy

  • aerospike_helpers
    • Bin operations (list, map, bitwise, etc.)

    • Aerospike expressions

    • Batch operations

    • Complex data type context

The aerospike module contains these classes:

Class

Description

aerospike.Client — Client Class

Aerospike client API

aerospike.Scan — Scan Class

Contains scan operations of entire sets.

aerospike.Query — Query Class

Handles queries over secondary indexes.

aerospike.GeoJSON — GeoJSON Class

Handles GeoJSON type data.

aerospike.KeyOrderedDict — KeyOrderedDict Class

Key ordered dictionary

In addition, the Python Data Mappings page explains how Python types map to Aerospike Server types.

See also

The Python Client Manual for a quick guide.

Content

Indices and tables