# Developer SDK

The Aerospike Developer SDK is a modern, developer-friendly interface for Aerospike. It provides intuitive APIs that feel native to your language, with built-in Aerospike Expression Language (AEL) queries and intelligent error handling.

## Why use the Developer SDKs?

-   Fluent, chainable methods that feel natural in Java and Python. No more verbose configuration objects.
    
-   Filter queries with readable expressions like `"$.status == 'active' and $.age > 21"`. No more complex, hard-to-maintain filter expressions.
    
-   Actionable errors with recovery suggestions. Know exactly what went wrong and how to fix it.
    
-   Separate development from operational concerns. Focus on writing application logic, not database plumbing.
    

## Quick example

-   [Java](#tab-panel-2666)
-   [Python](#tab-panel-2667)

```java
import com.aerospike.client.sdk.policy.Behavior;

import com.aerospike.client.sdk.Cluster;

import com.aerospike.client.sdk.ClusterDefinition;

import com.aerospike.client.sdk.DataSet;

import com.aerospike.client.sdk.Record;

import com.aerospike.client.sdk.RecordResult;

import com.aerospike.client.sdk.RecordStream;

import com.aerospike.client.sdk.Session;

public class FluentQuickStart {

    public static void main(String[] args) {

        DataSet users = DataSet.of("test", "users");

        try (Cluster cluster = new ClusterDefinition("localhost", 3000).connect()) {

            Session session = cluster.createSession(Behavior.DEFAULT);

            // Create or update a record.

            session.upsert(users)

                .bins("name", "email", "status", "age")

                .id("user-1").values("Alice", "alice@example.com", "active", 28)

                .execute();

            // Query and print active users.

            RecordStream stream = session.query(users)

                .where("$.status == 'active'")

                .execute();

            stream.forEach(result -> {

                Record record = result.recordOrThrow();

                System.out.println(record);

            });

            // Cleanup for repeatable local runs.

            session.delete(users.id("user-1")).execute().close();

        }

    }

}
```

```python
import asyncio

from aerospike_sdk import Client, DataSet

async def main() -> None:

    # Connect and create a session

    async with Client("localhost:3000") as client:

        session = client.create_session()

        users = DataSet.of("test", "users")

        key = users.id("user-1")

        # Create / update a record

        await session.upsert(key=key).put(

            {

                "name": "Alice",

                "email": "alice@example.com",

                "status": "active",

                "age": 28,

            }

        ).execute()

        # Query with AEL and stream results

        stream = await session.query(users).where("$.status == 'active'").execute()

        try:

            async for row in stream:

                record = row.record_or_raise()

                print(record.bins)

        finally:

            stream.close()

        # Cleanup

        await session.delete(key=key).execute()

if __name__ == "__main__":

    asyncio.run(main())
```

## Choose your path

New to Aerospike?

Start with the Quickstart to build your first app in 5 minutes.

[Quickstart →](https://aerospike.com/docs/develop/client/sdk/quickstart)

Migrating from Classic Client?

See what’s different and how to migrate your code.

[Migration Guide →](https://aerospike.com/docs/develop/client/sdk/concepts/migration)

## Language support

| Language | Status | Package |
| --- | --- | --- |
| Java | ✅ Available | `com.aerospike:aerospike-client-sdk` |
| Python | ✅ Available | `aerospike-sdk` |
| Rust | 🚧 Coming Soon | — |

## Next steps

-   [Install the SDK](https://aerospike.com/docs/develop/client/sdk/install)
-   [Connect to Aerospike](https://aerospike.com/docs/develop/client/sdk/connect)
-   [Tune performance & reliability](https://aerospike.com/docs/develop/client/sdk/concepts/behaviors)
-   [Update records (including Java CDT examples)](https://aerospike.com/docs/develop/client/sdk/usage/update)
-   [Use transactions](https://aerospike.com/docs/develop/client/sdk/usage/transactions)