SuperDuper MongoDB is a Python library that provides a high-level API for working with MongoDB. It is built on top of pymongo and provides a more user-friendly interface for working with MongoDB.
Project description
superduper_mongodb
SuperDuper MongoDB is a Python library that provides a high-level API for working with MongoDB. It is built on top of pymongo and provides a more user-friendly interface for working with MongoDB.
In general the MongoDB query API works exactly as per pymongo, with the exception that:
- inputs are wrapped in Document
- additional support for vector-search is provided
- queries are executed lazily
Installation
pip install superduper_mongodb
API
| Class | Description |
|---|---|
superduper_mongodb.data_backend.MongoDataBackend |
Data backend for MongoDB. |
superduper_mongodb.metadata.MongoMetaDataStore |
Metadata store for MongoDB. |
superduper_mongodb.query.MongoQuery |
A query class for MongoDB. |
superduper_mongodb.query.BulkOp |
A bulk operation for MongoDB. |
superduper_mongodb.artifacts.MongoArtifactStore |
Artifact store for MongoDB. |
Connection examples
Connect to mongomock
from superduper import superduper
db = superduper('mongomock://test')
Connect to MongoDB
from superduper import superduper
db = superduper('mongodb://localhost:27017/documents')
Connect to MongoDB Atlas
from superduper import superduper
db = superduper('mongodb+srv://<username>:<password>@<cluster-url>/<database>')
Query examples
Inserts
db['my-collection'].insert_many([{'my-field': ..., ...}
for _ in range(20)
]).execute()
Updates
db['my-collection'].update_many(
{'<my>': '<filter>'},
{'$set': ...},
).execute()
Selects
db['my-collection'].find({}, {'_id': 1}).limit(10).execute()
Vector-search
Vector-searches may be integrated with .find.
db['my-collection'].like({'img': <my_image>}, vector_index='my-index-name').find({}, {'img': 1}).execute()
Read more about vector-search here.
Deletes
db['my-collection'].delete_many({}).execute()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superduper_mongodb-0.5.1.tar.gz.
File metadata
- Download URL: superduper_mongodb-0.5.1.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
016355dbfc86f0e67dbd807928d85f949a193ed056d5f0693b6ed96cc4039cc4
|
|
| MD5 |
582ab1ed041ef564651e810748ea3d72
|
|
| BLAKE2b-256 |
0db4d1ca280bf377d917eccf5fd1cdaf8d10b03f1fe744d10fe2601fd7f4b218
|
Provenance
The following attestation bundles were made for superduper_mongodb-0.5.1.tar.gz:
Publisher:
release_plugins.yaml on superduper-io/superduper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superduper_mongodb-0.5.1.tar.gz -
Subject digest:
016355dbfc86f0e67dbd807928d85f949a193ed056d5f0693b6ed96cc4039cc4 - Sigstore transparency entry: 173211994
- Sigstore integration time:
-
Permalink:
superduper-io/superduper@3a8a4f3575c8aea9a33e949312cc6fc8c087bdb7 -
Branch / Tag:
refs/heads/0.5 - Owner: https://github.com/superduper-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_plugins.yaml@3a8a4f3575c8aea9a33e949312cc6fc8c087bdb7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file superduper_mongodb-0.5.1-py3-none-any.whl.
File metadata
- Download URL: superduper_mongodb-0.5.1-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4db63fc009a93ddafed38e9fcbb3792a7e7098c76fc1c9b0a8eb0c5027c69f53
|
|
| MD5 |
6d7852b14576e8e9dd8e4811662d918e
|
|
| BLAKE2b-256 |
68f342527f88828fb78009ae197e9ef3c3a3d1eb806a5779ee797af3932a84f6
|
Provenance
The following attestation bundles were made for superduper_mongodb-0.5.1-py3-none-any.whl:
Publisher:
release_plugins.yaml on superduper-io/superduper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superduper_mongodb-0.5.1-py3-none-any.whl -
Subject digest:
4db63fc009a93ddafed38e9fcbb3792a7e7098c76fc1c9b0a8eb0c5027c69f53 - Sigstore transparency entry: 173211997
- Sigstore integration time:
-
Permalink:
superduper-io/superduper@3a8a4f3575c8aea9a33e949312cc6fc8c087bdb7 -
Branch / Tag:
refs/heads/0.5 - Owner: https://github.com/superduper-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_plugins.yaml@3a8a4f3575c8aea9a33e949312cc6fc8c087bdb7 -
Trigger Event:
push
-
Statement type: