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.1.0.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for aioworkers_mongo-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e4e74786cb218be330843f33a75b502f5b9fc2b67f5aeab617c50054970fe40 |
|
MD5 | 21c2bffa71290e4a48261764c7048bca |
|
BLAKE2b-256 | 67205e4e04a7d2b37b6c31885c08f6f84b544721d1f9c076785dbec70ebe67e4 |