Python bindings for pgvector.rs
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_distancenegative_dot_product_distancenegative_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
Metadata
Release files for pgvecto-rs 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pgvecto_rs-0.1.2.tar.gz | 10.2 kB | Without provenance | Details for pgvecto_rs-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pgvecto_rs-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pgvecto_rs-0.1.2-py3-none-any.whl |
Total release size: 18.6 kB
Release files / pgvecto_rs-0.1.2.tar.gz
| Download URL | pgvecto_rs-0.1.2.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2a87db6f2d21e485ce5a4778bb90d63e85d3cb9b60c7dcd953d9b973fa5dc9d
|
|
BLAKE2b-256 checksum How to use checksums |
b175187a225ff6386fc402bdfab0b30b61c13b8e6ab75bd6e118df62debb2948
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.10.0 CPython/3.10.12
|
Release files / pgvecto_rs-0.1.2-py3-none-any.whl
| Download URL | pgvecto_rs-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66374e85951348ac386413743255a2f57d2ac0d5c173bc8eb39b4c612fa9ad73
|
|
BLAKE2b-256 checksum How to use checksums |
49f3d80076c6477a5517f67b1c7db45ae8812792272e7ba5638b12d9e1e57160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.10.0 CPython/3.10.12
|
Security for pgvecto-rs 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.