This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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

Installation:

pip install mlask

Create your first app:

To create the skeleton run:

mlask-admin.py startapp your_apps_name

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

  • manage.py
  • config.py
  • tests.py
  • views.py

For the “hello world” examples check “views.py” and “tests.py”.

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

python manage.py runserver

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

python manage.py test

Edit “config.py” to change server settings, add aditional modules to your app and to define your own configuration. All uppercase variables from “config.py” are accessible from “app.config” module. More on Flask configuration: flask.pocoo.org/docs/config/.

And that’s mostly it. For full Flask documentation visit flask.pocoo.org/docs/api/.

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 mycommands.py with the following content:

from mlask.management.commands 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 config.py “MODULES” and test it out by running:

python manage.py example "Hello"
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Mlask-0.2.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Mar 19, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting