Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.2k forks source link

Feature proposal: support management commands for frameworks other than Django #821

Open blurrcat opened 7 years ago

blurrcat commented 7 years ago

Context

It's often necessary to run manage commands in other web frameworks.

For example, Flask comes with an "official" cli called flask as of 0.11. We often need to run db migrations like flask db upgrade. Other frameworks like Pymarid has their own management cli too.

To invoke those commands with Zappa now, people need to figure out which python function correspond to a command, and call it with invoke.

Since this is a common requirement, it would be nice for Zappa to support it out of the box.

Possible Fix

I think there can be 2 ways to support this:

I'm happy to make a PR if you're OK with any of them.

Miserlou commented 7 years ago

I like this (solution 1), but I think the interface is simply:

zappa invoke 'db upgrade' --cli

Happy to accept a PR with test!

ghost commented 5 years ago

Any news on this? It would be great if this was added.