Official Integrations

Universal Connectivity

MaazDB is more than a database engine. Build applications faster with our native, high-performance client libraries that handle encryption, binary protocols, and connection pooling automatically.

3 Active Drivers
15+ Coming Soon
TLS 1.3 Secured
MaazDB Core
Python
Node.js
Rust
Go
Java
Python Node.js Rust
Go
Java
PHP
Ruby
Swift
C# / .NET
C++
Kotlin
Scala
Perl
Lua
Dart
Elixir
Haskell
Julia
R

MaazDB-Py

The official pure-Python client library for MaazDB. It provides a simple, idiomatic Pythonic API while handling complex tasks like automatic TLS 1.3 handshakes and binary protocol serialization under the hood.

  • Pure Python implementation (No C-extensions required)
  • Context Manager support for safe connection handling
  • Automatic Big-Endian binary packing
  • DB-API 2.0 compliance (Coming soon)
v1.0.0 MIT Python 3.8+

Installation

pip install maazdb-py

Usage Example

from maazdb import MaazDB

# 1. Initialize the client
db = MaazDB()

try:
    # 2. Connect securely
    db.connect(
        host="127.0.0.1",
        port=8888,
        user="admin", 
        password="admin"
    ) 
    print("✓ Connected to MaazDB")

    # 3. Execute SQL
    db.query("CREATE DATABASE analytics;")
    db.query("USE analytics;")
    db.query("CREATE TABLE logs (id SERIAL PRIMARY KEY, message TEXT);")
    
    # 4. Insert and Fetch
    db.query("INSERT INTO logs (message) VALUES ('System started');")
    results = db.query("SELECT * FROM logs;")
    print(f"Results:\n{results}")

except Exception as e:
    print(f"An error occurred: {e}")

finally:
    # 5. Always close the connection
    db.close()

Pro Tip

Use the Context Manager (with MaazDB() as db:) in your production code. It guarantees that your TLS socket is safely closed and resources are freed, even if an exception occurs during execution.

MaazDB-JS

A high-performance, asynchronous Node.js client library. It leverages native Promises and Node.js Buffers to implement the custom MaazDB binary protocol securely over TLS 1.3. Perfect for real-time web applications and microservices.

  • Async/Await first design
  • Zero-copy parsing using native Node Buffers
  • Built-in connection pooling
  • Full TypeScript definitions included
v1.0.0 MIT Node 14.x+

Installation

npm install maazdb-js
# or using yarn
yarn add maazdb-js

Usage Example

const MaazDB = require('maazdb-js');

async function main() {
    // 1. Initialize the client
    const db = new MaazDB();

    try {
        // 2. Connect securely (TLS is handled automatically)
        await db.connect(
            "127.0.0.1",
            8888, 
            "admin", 
            "admin"
        );
        console.log("✓ Connected to MaazDB");

        // 3. Run SQL commands
        await db.query("CREATE DATABASE web_app;");
        await db.query("USE web_app;");
        
        // 4. Insert Data
        await db.query("CREATE TABLE users (id SERIAL PRIMARY KEY, username TEXT);");
        await db.query("INSERT INTO users (username) VALUES ('maaz_dev');");

        // 5. Fetch Results
        const results = await db.query("SELECT * FROM users;");
        console.log("Results:", results);

    } catch (error) {
        console.error("Database Error:", error.message);
    } finally {
        // 6. Close connection
        db.close();
    }
}

main();

Performance Tip

For high-traffic web servers, initialize the MaazDB connection pool at the top level of your application rather than creating a new connection per HTTP request. This eliminates TLS handshake overhead.

MaazDB-RS

The official high-speed Rust SDK built on Tokio. It implements the binary protocol over a secure TLS 1.3 socket, allowing Rust applications to communicate with your database safely with zero-cost abstractions.

  • 100% Safe Rust implementation
  • Powered by Tokio for async workflows
  • Modern TLS 1.3 support via rustls
  • Type-safe query building
v0.1.0 Apache 2.0 Rust 1.65+

Cargo.toml

[dependencies]
maazdb-rs = "0.1.0"
tokio = { version = "1.0", features = ["full"] }

Usage Example

use maazdb_rs::MaazDB;
use std::error::Error;

fn main() -> Result<(), Box> {
    // 1. Establish a Secure Connection
    let mut db = MaazDB::connect("127.0.0.1",
     8888, 
     "admin", 
     "admin")?;
    println!("✓ Connected to MaazDB via TLS 1.3");

    // 2. Execute SQL Commands
    db.query("CREATE DATABASE store_prod;")?;
    db.query("USE store_prod;")?;
    db.query("CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT);")?;

    // 3. Insert Data
    db.query("INSERT INTO users (name) VALUES ('Maaz');")?;
    
    // 4. Fetch Results
    let results = db.query("SELECT * FROM users;")?;
    println!("--- Query Results ---\n{}", results);

    Ok(())
}

Security Tip

The Rust driver uses rustls by default to avoid OpenSSL dependencies. Ensure your system's root certificates are up to date, or provide a custom certificate path in the connection builder for self-signed deployments.