Make it possible to install user mods

Issue #143 resolved
Former user created an issue

It would be nice if user could install it's own mod. The code:

def install_mods(*mods): 
    for mod in mods: 
        _mod = getattr(__import__('sqlalchemy.mods.%s' % mod).mods, mod) 
        _mod.install_plugin()

expects to find extensions inside "sqlalchemy.mods". I'm aware that it is possible to manually call install_plugin (and to append itself into some list) but framework for extensions should support user mods in the same way as builtin mods.

Comments (2)

  1. Mike Bayer repo owner

    yeah i definitely want that to happen. easiest way i could think of would be to pass modules directly to the function:

       import mymod1, mymod2
       install_mods('builtinmod1', 'builtinmod2', mymod1, mymod2)
    

    comments ?

  2. Log in to comment