Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Console command framework for Pyramid

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 demo
Octocat-spinner-32 pyramid_command
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES.txt
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

pyramid_command

Console commands manager for Pyramid framework

usage

install package

Write your console commands. For example in myproject/console.py:

from pyramid_command import Command

class MyCmd(Command):

    name = "my_cmd"
    description = "My usefull command"

    args = (
                ("echo", {"help":"echo the string you use here"}),
                (("-f", "--file"), {"help":"file"}),
            )

    def run(self, echo='dd', file=None):
        print self.name, "runs", echo, file

Then configure where to search your commands. For example in development.ini:

    [app:main]
    use = egg:myproject
    ...
    ...
    console_commands = myproject.console

Now run:

>>>pcommand development.ini my_cmd echoval
Something went wrong with that request. Please try again.