Metadata-Version: 2.4
Name: localstack-extension-pgvector
Version: 0.1.1
Summary: LocalStack extension to enable pgvector automatically
Author-email: Muhammad Ikhwan Fathulloh <muhammadikhwanfathulloh17@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Muhammad Ikhwan Fathulloh
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Nocturnailed-Community/localstack-extension-pgvector
Project-URL: Bug Tracker, https://github.com/Nocturnailed-Community/localstack-extension-pgvector/issues
Project-URL: Source Code, https://github.com/Nocturnailed-Community/localstack-extension-pgvector
Keywords: localstack,extension,pgvector,postgres,vector-search
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Testing
Classifier: Intended Audience :: Developers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: localstack-ext>=1.0.0
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/Nocturnailed-Community/localstack-extension-pgvector/main/pgvector.png" alt="pgvector-extension Logo" width="200">
</p>

# LocalStack pgvector Extension 🚀

[![Install LocalStack Extension](https://localstack.cloud/gh/extension-badge.svg)](https://app.localstack.cloud/extensions/remote?url=git+https://github.com/Nocturnailed-Community/localstack-extension-pgvector/#egg=localstack-extension-pgvector)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/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](https://app.localstack.cloud/extensions) and enter this repository URL:
`https://github.com/Nocturnailed-Community/localstack-extension-pgvector`

### Using CLI
Use the following command to install the extension locally:
```bash
localstack extensions install "https://github.com/Nocturnailed-Community/localstack-extension-pgvector"
```

### Local Development (Editable Mode)
1. Clone this repository.
2. Run:
   ```bash
   pip install -e .
   ```
3. Restart LocalStack.

---

## 🚀 Usage

1. **Start LocalStack:**
   ```bash
   localstack start
   ```
2. **Launch PostgreSQL/RDS:**
   Use AWS CLI or SDK to create a database instance. Example:
   ```bash
   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:
```sql
SELECT * FROM pg_extension WHERE extname = 'vector';
```

---

## 👨‍💻 Contributors

- **Muhammad Ikhwan Fathulloh** ([@Muhammad-Ikhwan-Fathulloh](https://github.com/Muhammad-Ikhwan-Fathulloh))
- Email: `muhammadikhwanfathulloh17@gmail.com`

---

## 📜 License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---

<p align="center">
  Built with ❤️ by <b>Noc Lab</b> as part of the LocalStack ecosystem.
</p>
