PyMongo-VoyageAI-Multimodal
PyMongo integration with VoyageAI for multimodal embedding.
Installation
Requires Python 3.10+.
pip install --pre pymongo-voyageai-multimodal
Quickstart
Obtain an API key for VoyageAI.
from pymongo_voyageai_multimodal import PyMongoVoyageAI
# Create our client.
client = PyMongoVoyageAI(
voyageai_api_key=os.environ["VOYAGE_API_KEY"],
mongo_connection_string=os.environ["MONGODB_URI"],
s3_bucket_name="<my-bucket-name>",
collection_name="test",
database_name="tests",
)
# Load data from a pdf url.
url = "https://www.fdrlibrary.org/documents/356632/390886/readingcopy.pdf"
images = client.url_to_images(url)
resp = client.add_documents(images)
# Wait for the vector search index to update.
client.wait_for_indexing()
# Query the embeddings, extracting the images.
query = "The consequences of a dictator's peace"
data = client.similarity_search(query, extract_images=True)
# Display the best image match.
data[0]["inputs"][0].image.show()
# Clean up and close the client.
client.delete_many({})
client.close()
Release files for pymongo-voyageai-multimodal 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymongo_voyageai_multimodal-0.2.0.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymongo_voyageai_multimodal-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.2 kB
Release files / pymongo_voyageai_multimodal-0.2.0.tar.gz
| Download URL | pymongo_voyageai_multimodal-0.2.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a33adc36bdfe341be79a96be2d87142e599e4aa81a8dd40985367380bb7783cf
|
|
BLAKE2b-256 checksum How to use checksums |
abe54c6df671b46c94224c758468d9b2dfc4d4ba756d8564ce3b5cfc17285c9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.
Transparency logRelease files / pymongo_voyageai_multimodal-0.2.0-py3-none-any.whl
| Download URL | pymongo_voyageai_multimodal-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4fac0800d3f32c856e921a768cc2370dde3796fc744b4ac93883e7e73620a64
|
|
BLAKE2b-256 checksum How to use checksums |
f51ffbbbc4a4718459af761a9a94fab9fdd62c82f092035279c44032c7f53bc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.
Transparency log