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
aioworkers-mongo-0.2.0.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for aioworkers_mongo-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41892511c572b39807ffc6d8390f6589ea71f280711b24a0f86ee3202a4c6c71 |
|
MD5 | 4d57d75569fc0913cb94039474df9c05 |
|
BLAKE2b-256 | f0cd6c63eca47d67d71e10f958e770de42bf7805bc1e8a1cdd6b2e011f0da630 |