Module for working with MongoDB via asyncpg
Project description
aioworkers-mongo
Mongo plugin for aioworkers
.
Usage
Connection
Add this to aioworkers config.yaml:
mongo:
cls: aioworkers_mongo.base.Connector
uri: 'mongodb://localhost:27017/'
You can get access to mongo anywhere via context:
docs = [doc async for doc in context.mongo.db.collection.find({})]
Development
Run Mongo DB:
docker run --rm -p 27017:27017 --name mongo -d mongo
Install dev requirements:
poetry install
Activate env:
. .venv/bin/activate
Run tests:
pytest
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
Close
Hashes for aioworkers_mongo-0.2.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90db55d2a6718236e4b7f6b80bf7ad760b0bb0b7371403e234346114136871eb |
|
MD5 | a7cd4aecd3cb07c03a4a81c89a100e4f |
|
BLAKE2b-256 | 7f09596b15373e9845f603f243dbcce1026421f6d130d954adb59d0147e0695f |