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.

🚀 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.1.tar.gz (5.2 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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for localstack_extension_pgvector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 251f1f1eabdd406cb26e67732a6f3a674e5da4c9e2ad0fb6d0db6d92cc56b759
MD5 015e18c87332e129e8f9cb115644d180
BLAKE2b-256 9055a5b8f05fae47a6a2220d31a7342e2a0e3211cd22976ff3344849a85cd000

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for localstack_extension_pgvector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad4b82a9b2e3a369d5b2cdde4938a826006eab62261a36a76168b521ae5da2b
MD5 fcda0a88d44b684e66b09bdea8b8e11b
BLAKE2b-256 be92ae59dfddc7981db83b7e31d801ed02c1ca3fb0cfc67e433bd313b67d3a5d

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