Skip to main content

LocalStack Extension: ParadeDB on LocalStack

Project description

ParadeDB on LocalStack

This repo contains a LocalStack Extension that facilitates developing ParadeDB-based applications locally.

ParadeDB is an Elasticsearch alternative built on Postgres. It provides full-text search with BM25 scoring, hybrid search combining semantic and keyword search, and real-time analytics capabilities.

After installing the extension, a ParadeDB server instance will become available and can be accessed using standard PostgreSQL clients.

Connection Details

Once the extension is running, you can connect to ParadeDB using any PostgreSQL client with the following default credentials:

  • Host: localhost (or the Docker host if running in a container)
  • Port: 5432 (mapped from the container)
  • Database: mydatabase
  • Username: myuser
  • Password: mypassword

Example connection using psql:

psql -h localhost -p 5432 -U myuser -d mydatabase

Example connection using Python:

import psycopg2

conn = psycopg2.connect(
    host="localhost",
    port=5432,
    database="mydatabase",
    user="myuser",
    password="mypassword"
)

ParadeDB Features

ParadeDB includes the pg_search extension, for both search and analytics workloads.

Example of BM25 scoring, from the excellent quickstart guide:

CALL paradedb.create_bm25_test_table(
  schema_name => 'public',
  table_name => 'mock_items'
);

CREATE INDEX search_idx ON mock_items
USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range)
WITH (key_field='id');

SELECT description, pdb.score(id)
FROM mock_items
WHERE description ||| 'running shoes' AND rating > 2
ORDER BY score DESC
LIMIT 5;

Configuration

The following environment variables can be passed to the LocalStack container to configure the extension:

  • PARADEDB_POSTGRES_USER: PostgreSQL username (default: myuser)
  • PARADEDB_POSTGRES_PASSWORD: PostgreSQL password (default: mypassword)
  • PARADEDB_POSTGRES_DB: Default database name (default: mydatabase)

Prerequisites

  • Docker
  • LocalStack Pro (free trial available)
  • localstack CLI
  • make

Install from GitHub repository

This extension can be installed directly from this Github repo via:

localstack extensions install "git+https://github.com/localstack/localstack-extensions.git#egg=localstack-paradedb&subdirectory=paradedb"

Install local development version

Please refer to the docs here for instructions on how to start the extension in developer mode.

Change Log

  • 0.1.0: Initial version of the extension

License

The code in this repo is available under the Apache 2.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localstack_paradedb-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localstack_paradedb-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file localstack_paradedb-0.1.0.tar.gz.

File metadata

  • Download URL: localstack_paradedb-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for localstack_paradedb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a062d260a4e252f2048ee52d54f645f741948f5e24d2dfe9d85ae657463e95ae
MD5 72d251e5dda0ee131e25f9f6e821caa8
BLAKE2b-256 093fa908b18a4d681067d7d156048f433741baef4d9430467d018c316fbb390d

See more details on using hashes here.

File details

Details for the file localstack_paradedb-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for localstack_paradedb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 185ed843e2a8940689c18b0948dbbfad0883a5cce6d77d46eb54212c669696fa
MD5 a9c99dcd224aa46f717c89fb63e13da8
BLAKE2b-256 2f16300cf47b37cf1349a1de75fc697e2887e070df0dcddff1b10ae8993d0c3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page