Skip to main content

LocalStack extension to enable pgvector automatically

Project description

pgvector-extension Logo

LocalStack pgvector Extension 🚀

Install LocalStack Extension License: MIT

localstack-extension-pgvector is a professional extension for LocalStack designed to simplify the development of AI-driven applications and Vector Search. This extension automatically enables pgvector on every PostgreSQL instance running in LocalStack and provides a web interface via pgweb.


✨ Key Features

  • Auto-Enable pgvector: Automatically executes CREATE EXTENSION IF NOT EXISTS vector; when a PostgreSQL container starts.
  • pgweb Integration: Automatically launches a pgweb (Web UI) instance as a sidecar to visualize your vector data.
  • Seamless Integration: Supports standard RDS and PostgreSQL instances in LocalStack.
  • Health Check Endpoint: Verify extension status via a dedicated HTTP endpoint.

🛠️ Installation

Using LocalStack Dashboard (Recommended)

Click the badge above or open the LocalStack Extensions Dashboard and enter this repository URL: https://github.com/Nocturnailed-Community/localstack-extension-pgvector

Using CLI

Use the following command to install the extension locally:

localstack extensions install "https://github.com/Nocturnailed-Community/localstack-extension-pgvector"

Local Development (Editable Mode)

  1. Clone this repository.
  2. Run:
    pip install -e .
    
  3. Restart LocalStack.

🐳 Using Docker Compose

For easy local development, you can use the provided docker-compose.yml:

  1. Start LocalStack:
    docker compose up -d
    
  2. The extension will be installed automatically. Check status:
    curl http://localhost:4566/pgvector-status
    

🛠️ Usage

  1. Start LocalStack:
    localstack start
    
  2. Launch PostgreSQL/RDS: Use AWS CLI or SDK to create a database instance. Example:
    awslocal rds create-db-instance --db-instance-identifier mydb --engine postgres --allocated-storage 20
    
  3. Access pgweb: Open your browser and navigate to http://localhost:8081 to view your data.
  4. Check Status: Verify if the extension is active: http://localhost:4566/pgvector-status

📊 Manual Verification

You can run the following query to ensure pgvector is enabled:

SELECT * FROM pg_extension WHERE extname = 'vector';

👨‍💻 Contributors


📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ by Noc Lab as part of the LocalStack ecosystem.

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_extension_pgvector-0.1.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

localstack_extension_pgvector-0.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file localstack_extension_pgvector-0.1.2.tar.gz.

File metadata

File hashes

Hashes for localstack_extension_pgvector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c557b1ed63195296e3bb32c1c5fcd64c38c140bd53799805180d0a8d31a32596
MD5 7c668d7a30a6dd7e12ec8048481555eb
BLAKE2b-256 97ead7333fc6515b130e88548caccad0a117a24b07420ceb1bf1a2d0919c6488

See more details on using hashes here.

File details

Details for the file localstack_extension_pgvector-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for localstack_extension_pgvector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e602f1f2430e0624904c72d7c07416b5d1587d56c5283799a54dded01fd1fb4
MD5 a5b015a4d8a445103ed8db5488c39a38
BLAKE2b-256 efcd847447bb7752a906d30486d25f2d27ff1ac0e9697e0e7207b9b4780f3113

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