Skip to main content


Vantage Discovery Python SDK

The Vantage Discovery Python SDK provides an easy-to-use interface to interact with the Vantage vector database, enabling developers to seamlessly integrate vector search and collection management capabilities into their Python applications.

Installation

To install the Vantage Python SDK, run the following command:

pip install vantage-sdk

Quickstart

To get started with the Vantage Python SDK, you'll need to set up your Vantage account and obtain your account ID and Vantage API key. Once you have your ID and key, you can initialize the VantageClient which you can then use to manage your account, collections and keys and perform searches.

from vantage_sdk import VantageClient

# Initialize the VantageClient with your Vantage API key and Account ID
vantage_client = VantageClient.using_vantage_api_key(
    vantage_api_key='YOUR_VANTAGE_API_KEY',
    account_id='YOUR_ACCOUNT_ID'
)

# Now you can use the client to manage collections, documents, and perform searches

Overview

The Vantage Discovery Python SDK is divided into several modules, allowing you to manage account, collections, and API keys, as well as perform various types of searches.

Key Features

  • Collection Management: Easily create, update, list, and delete collections.
  • Documents Upload: Upload your data easily to your collections.
  • Search: Perform semantic, embedding and "more like this/these" searches within your collections.
  • LLM Keys Management: Keep your LLM provider secrets safe and up-to-date.

🔍 Examples

Creating a Collection

To create a new collection for storing documents, specify the collection ID, the dimension of the embeddings, and the LLM (language learning model) details. Here, we use text-embedding-ada-002 from OpenAI with the necessary secret key.

📚 Visit management-api documentation for more details.

collection = OpenAICollection(
    collection_id="my-collection",
    embeddings_dimension=1536,
    llm="text-embedding-ada-002",
    llm_secret="YOUR_OPENAI_SECRET_KEY",
)

created_collection = vantage_client.create_collection(collection=collection)

print(f"Created collection: {created_collection.collection_name}")

Uploading Documents

To upload documents to your collection, provide a list of document IDs and corresponding text. Each document is wrapped in a VantageManagedEmbeddingsDocument object. This example demonstrates uploading a batch of documents.

📚 Visit management-api documentation for more details.

ids = [
    "1",
    "2",
    "3",
    "4",
]

texts = [
    "First text",
    "Second text",
    "Third text",
    "Fourth text",
]

documents = [
    VantageManagedEmbeddingsDocument(text=text, id=id)
    for id, text in zip(ids, texts)
]

instance.upsert_documents(
    collection_id="my-collection",
    documents=documents,
)

To perform a semantic search within your collection, specify the text you want to find similar documents for. This example retrieves documents similar to the provided text, printing out each document's ID and its similarity score.

📚 Visit search-api documentation for more details.

search_result = vantage_client.semantic_search(
    text="Find documents similar to this text",
    collection_id="my-collection"
)
for result in search_result.results:
    print(result.id, result.score)

📚 Documentation

For detailed documentation on all methods and their parameters, please refer to the Vantage Discovery official documentation.

Metadata

Release files for vantage-sdk 0.9.5

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

Source distribution (sdist)

Source distribution for vantage-sdk 0.9.5
File Size Uploaded Provenance Actions
vantage_sdk-0.9.5.tar.gz 174.2 kB Without provenance Details for vantage_sdk-0.9.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vantage-sdk 0.9.5
File Interpreter ABI Platform Actions
vantage_sdk-0.9.5-py3-none-any.whl Python 3 none any Details for vantage_sdk-0.9.5-py3-none-any.whl

Total release size: 341.4 kB

Release files / vantage_sdk-0.9.5.tar.gz

Download URL vantage_sdk-0.9.5.tar.gz
Size 174.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e8b1a24b86b10270dcebd32ab8fc6b5301342c773e06e9e8fb3ba3d54447ede5
BLAKE2b-256 checksum
How to use checksums
3ce00a2709e436338fa6269515fd5b800545c799438b5fab71101bb60030c09e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.11.9 Linux/4.14.352-268.569.amzn2.x86_64

Release files / vantage_sdk-0.9.5-py3-none-any.whl

Download URL vantage_sdk-0.9.5-py3-none-any.whl
Size 167.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad648993c44bfc998c53d5695ef937866d07f722fb4530a9153356fcf3cdf309
BLAKE2b-256 checksum
How to use checksums
3e5279591349dbb5ed488b4dda616c7a35b183804dc4783b78924ff563b726c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.11.9 Linux/4.14.352-268.569.amzn2.x86_64

Security for vantage-sdk 0.9.5

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.

Release history Release notifications | RSS feed

This release

0.9.5 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