muscles-data-mongodb
MongoDB adapter package for muscles-data.
This package is intentionally separate from muscles-data: the core package
owns typed ports and runtime, while this package owns the PyMongo-backed
DocumentStorePort adapter.
Related packages
- Core runtime and port contracts:
muscles-data - Elasticsearch search adapter:
muscles-data-elasticsearch - OpenSearch search adapter:
muscles-data-opensearch - Redis key-value/lock/stream adapter:
muscles-data-redis - Qdrant vector adapter:
muscles-data-qdrant - S3 object-store adapter:
muscles-data-s3 - SQLAlchemy direct SQL resource adapter:
muscles-data-sqlalchemy - Executable example:
example_data_mongodb_1
Install
python -m pip install muscles-data-mongodb
For local framework development:
PYTHONPATH=../muscles-data/src:src python3 -m pytest -q
Configuration
data:
resources:
mongo.content:
type: mongodb
url_env: MONGO_URL
database: content
timeout: 3
max_limit: 100
Usage
Register this adapter once in the application composition root when building
the shared DataAdapterCatalog, alongside other configured adapters:
catalog.register(MongoDocumentStoreFactory())
The mongo.content resource itself is declared in the application's central
data.resources configuration shown below. A package resolves the port from
the existing runtime; it does not build another catalog or DataRuntime:
from muscles.data.ports import DocumentStorePort
store = app.resource.connect("mongo.content", DocumentStorePort)
Then use the narrow port:
store.upsert_document("profiles", "denis", {"name": "Denis"})
document = store.get_document("profiles", "denis")
documents = store.find_documents("profiles", filters={"role": "developer"}, limit=20)
store.delete_document("profiles", "denis")
The adapter maps document_id to MongoDB _id internally and returns public
documents without _id to keep the port backend-neutral.
Metadata
Release files for muscles-data-mongodb 0.2.1
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 |
|---|---|---|---|---|
| muscles_data_mongodb-0.2.1.tar.gz | 13.0 kB | With provenance | Details for muscles_data_mongodb-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| muscles_data_mongodb-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for muscles_data_mongodb-0.2.1-py3-none-any.whl |
Total release size: 21.6 kB
Release files / muscles_data_mongodb-0.2.1.tar.gz
| Download URL | muscles_data_mongodb-0.2.1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e96c8da5c7df3e52813c09346da82b17be92673f6115ef5c736ae8325b1ad5d
|
|
BLAKE2b-256 checksum How to use checksums |
0e35990170072056c4848c9364c00e03896843be08594e37672ebe9df224ae62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logRelease files / muscles_data_mongodb-0.2.1-py3-none-any.whl
| Download URL | muscles_data_mongodb-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb6ee1f1684bc2d4ac701cdd8af9fe01445820b4e75396be028c58e6a60604bb
|
|
BLAKE2b-256 checksum How to use checksums |
b413ed8a89a8fe15b9dea7b5574b1217226265cd1897955aa88340f1b104a04e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logSecurity for muscles-data-mongodb 0.2.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for muscles_data_mongodb-0.2.1.tar.gz
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 Nov 4, 2026.
Transparency logA 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.