Skip to main content

arc-vector-python

Python library and client for arc-vector database

Installation

// remote install
pip install arc-vector-python

// local install by package
pip install arc_vector_python-1.6.2.tar.gz

Features

  1. Type hints for all API methods
  2. Local mode - use same API without running server
  3. REST and gRPC support
  4. Minimal dependencies

Connect to ArcVector Server

To connect to Qdrant server, simply specify host and port:

from arc_vector_client import ArcVectorClient
from arc_vector_client.models import Distance, VectorParams
# REST
client = ArcVectorClient(url="http://localhost:8333")
# gRPC
client = ArcVectorClient(host="localhost", grpc_port=8334, prefer_grpc=True)

Async client

Starting from version 1.6.2, all python client methods are available in async version.

To use it, just import AsyncArcVectorClient instead of ArcVectorClient:

from arc_vector_client import AsyncArcVectorClient, models
import numpy as np
import asyncio

async def main():
    # Your async code using ArcVectorClient might be put here
    client = AsyncArcVectorClient(url="http://localhost:8333")
    # client = AsyncArcVectorClient(host="localhost", grpc_port=8334, prefer_grpc=True)
    await client.create_collection(
        collection_name="my_collection",
        vectors_config=models.VectorParams(size=10, distance=models.Distance.COSINE),
    )

    await client.upsert(
        collection_name="my_collection",
        points=[
            models.PointStruct(
                id=i,
                vector=np.random.rand(10).tolist(),
            )
            for i in range(100)
        ],
    )

    res = await client.search(
        collection_name="my_collection",
        query_vector=np.random.rand(10).tolist(),  # type: ignore
        limit=10,
    )

    print(res)

asyncio.run(main())

Both, gRPC and REST API are supported in async mode. More examples can be found here.

Metadata

Release files for arc-vector-python 1.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arc-vector-python 1.6.4
File Size Uploaded Provenance
arc_vector_python-1.6.4.tar.gz 145.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arc-vector-python 1.6.4
File Interpreter ABI Platform
arc_vector_python-1.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 320.0 kB

Release files / arc_vector_python-1.6.4.tar.gz

Download URL arc_vector_python-1.6.4.tar.gz
Size 145.2 kB
Tags Source
SHA-256 checksum
How to use checksums
679a59d22233a3ec1f8d12c62807035be6c3ae9c6f438c988f013c225f1cdd69
BLAKE2b-256 checksum
How to use checksums
57a3311da7edaca17d2cda9c7eaf47330eeee6037868cce7f8862acb0bbd8664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/21.6.0

Release files / arc_vector_python-1.6.4-py3-none-any.whl

Download URL arc_vector_python-1.6.4-py3-none-any.whl
Size 174.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb7b1306b03b49edeaf4f190304572030a1af1aeaf866ec2b275fca21450b1be
BLAKE2b-256 checksum
How to use checksums
535611d2166cbe37656fbf736a8ffd698d59281910fe6648f4dadc2182282fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/21.6.0

Security for arc-vector-python 1.6.4

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.

Release history Release notifications | RSS feed

This release

1.6.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page