Giter Club home page Giter Club logo

muffin-motor's Introduction

Muffin-Motor

Muffin-Motor -- A simple motor plugin for muffin framework.

Build Status

Requirements

  • python >= 3.4.1
  • muffin >= 0.5.5
  • motor >= 1.0

Installation

Muffin-Motor should be installed using pip:

pip install muffin-motor

Usage

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

Options

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({})

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/drgarcia1986/muffin-motor/issues

Contributing

Development of Muffin-Motor happens at: https://github.com/drgarcia1986/muffin-motor

Contributors

License

Licensed under a MIT license.

muffin-motor's People

Contributors

drgarcia1986 avatar jairhenrique avatar

Stargazers

Rômulo Oliveira avatar Alexander Ksenzov avatar Hugo Sena Ribeiro avatar

Watchers

 avatar  avatar

Forkers

josa

muffin-motor's Issues

A lot of mongo connections being opened

Hi @drgarcia1986 ,

i was playing with muffin and your plugin muffin-motor on docker containers and i realized that it is opening a lot of connections with mongo as you can see here. I've still realized that in you code hasn't any finish method declared to close opened connections as you can see on here.

Any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.