Nemo Logo
Nemo
Nemo / quickstart

Quick Start Guide

Get up and running with Nemo in 3 simple steps: install the Python package, connect to a local database file, and execute high-concurrency SQL queries.

1

Install nemo-py via pip

Nemo is distributed on PyPI as pre-compiled native binary wheels for Python 3.8+ across Linux, macOS, and Windows.

pip install nemo-py
2

Connect to Local Persistent Storage (.nm)

Nemo manages persistent .nm database files. Pass the logical database name (without file extension) to nemo.connect():

import nemo

# Connect to or create ./production.nm
with nemo.connect("production") as db:
    with db.connect_sync() as conn:
        print("Connected to Nemo database at:", db.path)
3

Create Tables, Insert Records, and Query

Use standard SQL statements with rich datatypes including JSON, ARRAY, and DICT:

import nemo

with nemo.connect("production") as db:
    with db.connect_sync() as conn:
        # 1. Create table
        conn.execute("""
            CREATE TABLE accounts (
                id BIGINT PRIMARY KEY,
                username VARCHAR NOT NULL UNIQUE,
                balance DOUBLE,
                is_active BOOLEAN DEFAULT true,
                metadata JSON
            );
        """)

        # 2. Insert with parameters
        conn.execute(
            "INSERT INTO accounts VALUES (?, ?, ?, ?, ?);",
            (1, "alice", 2500.75, True, {"tier": "gold", "tags": ["vip", "crypto"]})
        )

        # 3. Query records
        res = conn.execute("SELECT * FROM accounts WHERE id = ?;", (1,))
        print("Found:", res.fetchone())

Ready to explore deeper?

Check out all 7 transaction patterns or the asyncio connector documentation.

Documentation Portal →