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

Ascetic Command Runner

Not all of our projects are using either django or another God framework. So, once we start our hobby project, would be great to put into the game some commands. For example, maybe we need for our hobby project simple command test which loads custom TestRunner, etc In this case this package maybe handy for you!

Installation

Simply run in your bash:

pip install acmdrunner

Usage

In your django like manage.py command loader, you need to trigger following:

import os
from acmdrunner import Loader

...
make all your preparations, initialize project settings, etc
...

Loader.load_from_directory(os.path.dirname(__file__))
Loader.load_from_package('rit.app')

Loader will search recursively in passed folder for folders with name management. And try to load from folders found file acr_commands.py

An example of the file acr_commands.py:

from acmdrunner.dispatcher import CommandDispatcher
command_dispatcher = CommandDispatcher()


def execute(*args):
    pass

command_dispatcher.register_command('test', execute)

register_command registers specific command and handler for this command. Your commands should implement execute method. Better to inherit from BaseCommand. But as it is ascetic, you can simply pass class with execute method implemented. That’s all!

To run command, please trigger following call:

from your_package_place import command_dispatcher
command_dispatcher.execute_command(command_name, *args, **kwargs)

Real usage example

If you want to load all commands from specific namespace, you can implement following:

packages_to_traverse = ('rit.app', 'rit.core')
for package in packages_to_traverse:
    Loader.load_from_package(package[0])
Loader.load_from_directory(os.path.dirname(os.getcwd()))
Release History

Release History

1.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

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

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.8

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
acmdrunner-1.2.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source May 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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