Skip to main content

Python binding for pgvecto.rs

Project description

Python bindings for pgvector.rs

pdm-managed

Currently supports SQLAlchemy.

Usage

Install from PyPI:

pip install pgvecto_rs

See the usage examples:

SQLAlchemy

Install SQLAlchemy and psycopg3

pip install "psycopg[binary]" sqlalchemy

Then write your code. See examples/sqlalchemy_example.py and tests/test_sqlalchemy.py for example.

All the operators include:

  • squared_euclidean_distance
  • negative_dot_product_distance
  • negative_cosine_distance

psycopg3

Install psycopg3

pip install "psycopg[binary]"

Then write your code. See examples/psycopg_example.py and tests/test_psycopg.py for example.

Known issue:

  • Can not check the length of an vector when inserting it into a table. See: #96.

Development

This package is managed by PDM.

Set up things:

pdm venv create
pdm use # select the venv inside the project path
pdm sync

Run lint:

pdm run format
pdm run check

Run test in current environment:

pdm run test

Test

Tox is used to test the package locally.

Run test in all environment:

tox run

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

pgvecto_rs-0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

pgvecto_rs-0.1.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pgvecto_rs-0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.10.0 CPython/3.10.12

File hashes

Hashes for pgvecto_rs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e2a87db6f2d21e485ce5a4778bb90d63e85d3cb9b60c7dcd953d9b973fa5dc9d
MD5 f5899806cc102c4ebfa376d21b7edc0d
BLAKE2b-256 b175187a225ff6386fc402bdfab0b30b61c13b8e6ab75bd6e118df62debb2948

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgvecto_rs-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.10.0 CPython/3.10.12

File hashes

Hashes for pgvecto_rs-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66374e85951348ac386413743255a2f57d2ac0d5c173bc8eb39b4c612fa9ad73
MD5 8a08915a57b5678c801ea0506ff9b063
BLAKE2b-256 49f3d80076c6477a5517f67b1c7db45ae8812792272e7ba5638b12d9e1e57160

See more details on using hashes here.

Supported by

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