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({})]
Extended client config
mongo:
cls: aioworkers_mongo.base.Connector
client:
host: 'localhost'
port: 27017
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
File details
Details for the file aioworkers-mongo-0.2.1.tar.gz
.
File metadata
- Download URL: aioworkers-mongo-0.2.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.4.0-1069-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c8d9e317e40c2b07d140cc4a9a3cfa06a809de9ef6cfc6a2b34988093e91890 |
|
MD5 | c0c092876ea1a2ab5ae2c60bf9bbfae6 |
|
BLAKE2b-256 | 86eff25e40596e3190d012d7644e69e5d701999629410b5d0bc25febf22af9eb |
File details
Details for the file aioworkers_mongo-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: aioworkers_mongo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.4.0-1069-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f64b00e6a4d2846eff86d934e1738ab1a6712bacc046edd4d5cd6910c13345cf |
|
MD5 | d9a6624c204e40ae15d8e272b24f5ad5 |
|
BLAKE2b-256 | fcd858f43e8917a0510fffe58afa2b7e837beb41383259d9492914af58ca5d80 |