Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Create management scripts for your applications (like `python manage.py runserver`).

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 pyceo
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS.md
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 README.rst
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 runtests.py
Octocat-spinner-32 setup.py
README.md

IMPORTANT: I'm not mantaining this library any more. I now use Baker in my projects and you should too.

pyCEO

Create management scripts for your applications so you can do things like

python manage.py runserver

Features:

  • Support positional and named arguments.
  • You can define a default action
  • Uses the docstring of the actions as help.

Example:

:::Python
from pyceo import Manager

manager = Manager()

@manager.command
def runserver(host='0.0.0.0', port=None, **kwargs):
    """[-host HOST] [-port PORT]
    Runs the application on the local development server.
    """
    app.run(host, port, **kwargs)


@manager.command
def initdb():
    """Create the database tables (if they don't exist)"""
    from app.models import db

    db.create_all()


@manager.command
def change_password(login, passw):
    """[-login] LOGIN [-passw] NEW_PASSWORD
    Changes the password of an existing user."""
    from app.app import auth

    auth.change_password(login, passw)


if __name__ == "__main__":
    manager.run(default='runserver')

Go to the examples/ folder and run

python manage.py help

to see the result.

Why don't just use optparse or argparse?

Because this looks better and is easier to use and understand.


Copyright © 2011 by Lúcuma labs.
See AUTHORS.md for more details.
License: MIT License.

Thanks to @Yaraher for the project name suggestion.

Something went wrong with that request. Please try again.