rduplain/flask-script — Issue #12: Make it possible to integrate externally written subcommands
Author: rduplain
Created: 2012-02-29 16:29:55+00:00
State: open
Labels: import, proposal

I would like to integrate the the sqlalchemy-migrate command into my manage.py script. sqlalchemy-migrate implements a main() function which I can pass an argv list, and it'll do it's own option parsing on it.

Now, say if Flask-Script would allow commands to specify an option (like a class-level attribute maybe) to cause parse_known_args() to be used instead of the strict parse_args() when handling the command arguments, and would then pass on the remaining args to the command.

I could then easily pass them on to the sqlalchemy-migrate command, making it seem like they come from the command line direct.

---------------------------------------
- Bitbucket: https://bitbucket.org/danjac/flask-script/issue/12
- Originally Reported By: [Michael Elsdörfer](http://bitbucket.org/miracle2k)
- Originally Created At: 2010-08-24 03:56:23