Skip to content

Installation

Requirements

  • Python 3.12+
  • PostgreSQL 14+
  • pgvector extension for PostgreSQL

Installing pgraf

Install pgraf using pip:

pip install pgraf

For development, you can install the development dependencies:

pip install -e ".[dev]"

For building documentation:

pip install -e ".[docs]"

Database Setup

  1. Ensure pgvector is installed in your PostgreSQL instance

Follow the installation instructions at: https://github.com/pgvector/pgvector

  1. Create a database for pgraf:
createdb pgraf
  1. Apply the schema:
psql -d pgraf -f schema/pgraf.sql

Docker Setup

A Docker Compose configuration is included for easier development:

docker-compose up -d

This will start a PostgreSQL instance with pgvector pre-installed and the pgraf schema applied.