Muffin-Motor -- A simple motor plugin for muffin framework.
- python >= 3.4.1
- muffin >= 0.5.5
- motor >= 1.0
Muffin-Motor should be installed using pip:
pip install muffin-motor
Add muffin-motor to muffin plugin list:
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_motor',
)
)
And use motor plugin:
@app.register('/example')
class Example(muffin.Handler):
@asyncio.coroutine
def get(self, request):
collection = app.ps.motor.test
doc = yield from collection.find_one({'test': 'foo'})
return doc
MOTOR_HOST | Host of mongodb server (127.0.0.1 ) |
MOTOR_PORT | Port of mongodb server (27017 ) |
MOTOR_MAX_POOL_SIZE | Max connection pool size (1 ) |
MOTOR_DB | Database (default ) |
MOTOR_KWARGS | Others args of client create({} ) |
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/drgarcia1986/muffin-motor/issues
Development of Muffin-Motor happens at: https://github.com/drgarcia1986/muffin-motor
- drgarcia1986 (Diego Garcia)
Licensed under a MIT license.