Mlask for Flask

pip install Mlask==0.2


mlask is still fun

Mlask brings a bit of django like structure to Flask apps.


pip install mlask

Create your first app:

To create the skeleton run: startapp your_apps_name

This command will create a folder named your_apps_name with the following files:


For the "hello world" examples check "" and "".

When you're ok with your first app, start the testing server by running:

python runserver

Then run the tests I'm sure you've written:

python test

Edit "" to change server settings, add aditional modules to your app and to define your own configuration. All uppercase variables from "" are accessible from "app.config" module. More on Flask configuration:

And that's mostly it. For full Flask documentation visit

All built in commands:

runserver       Starts testing server
rungunicorn     Starts Gunicorn server
shell           Starts interactive shell with defined app
syncdb          Creates all tables defined by SQLAlchemy declarative
test            Runs all tests in "config.TEST_MODULES"
startapp        Creates an app direcory structure for the given app name in the current directory

Define your own command:

Create a file with the following content:

from import BaseCommand

class ExampleCommand(BaseCommand):
    __command_name__ = 'example' #optional
    __help__ = 'Short help' #optional

    def update_parser(self, parser):
        # Define rules for parsing the input.
        # Check argparse for full documentation.

        parser.add_argument('text', help="Text to print")

    def run(self, options):
        print options.text

Add "your_apps_name.mycommands" module to "MODULES" and test it out by running:

python example "Hello"