core Package

activity_aggregator Module

sidewalk.activity_aggregator

This module is the primary workhorse powering Sidewalk. Let’s execute some activity processors!

copyright:
  1. 2013 by Blake Rohde.
license:

ISC, see LICENSE for more details.

class sidewalk.core.activity_aggregator.ActivityAggregator(filename=None, active_activity_processor_keys=[], active_group_keys=[])

The ActivityAggregator object. It allows for the execution of the defined activity processors.

import_module(name)

Simple wrapper for importing the requested module.

run()

The primary workhorse. Runs/executes the active activity processors.

exceptions Module

sidewalk.exceptions

This module contains custom exceptions that can be thrown by Sidewalk.

copyright:
  1. 2013 by Blake Rohde.
license:

ISC, see LICENSE for more details.

exception sidewalk.core.exceptions.SidewalkGroupDoesNotExist(group_key)

Bases: exceptions.Exception

Activity processor group requested is not defined.

exception sidewalk.core.exceptions.SidewalkKeyDoesNotExist(key)

Bases: exceptions.Exception

Activity processor requested is not defined.

exception sidewalk.core.exceptions.SidewalkMethodDoesNotExist(module, method)

Bases: exceptions.Exception

The Activity processor (method) does exist in the specified module.

exception sidewalk.core.exceptions.SidewalkModuleImportError(module)

Bases: exceptions.Exception

Activity processor module could not be imported.

exception sidewalk.core.exceptions.SidewalkRogueActivityProcessor(activity_processor)

Bases: exceptions.Exception

The Activity processor threw an unhandled exception.

exception sidewalk.core.exceptions.SidewalkSectionNotDefined(filename, section)

Bases: exceptions.Exception

The specified settings file does not contain a required section.

exception sidewalk.core.exceptions.SidewalkSettingsFileIOError(filename, permission)

Bases: exceptions.Exception

Settings file IOError.

loggers Module

sidewalk.loggers

This module contains simple loggers for printing pretty messages.

copyright:
  1. 2013 by Blake Rohde.
license:

ISC, see LICENSE for more details.

sidewalk.core.loggers.debug(message, verbose=True)

Debug log wrapper for log.

sidewalk.core.loggers.error(message, verbose=True)

Error log wrapper for log.

sidewalk.core.loggers.log(message, tag='GENERAL', verbose=False)

Simple log/message function for the output of timestamped messages.

manager Module

sidewalk.manager

This module contains manager(s) for managing Sidewalk resources (setting files, etc.).

copyright:
  1. 2013 by Blake Rohde.
license:

ISC, see LICENSE for more details.

class sidewalk.core.manager.ActivityProcessorsManager(filename=None)

The ActivityProcessorsManager object. It allows for the management and storage of activity processors defined in the primary settings.conf config file.

add(key, activity_processor)

Add a new activity processor.

get_activity_processor(key)

Get the specified activity processor by its key.

get_activity_processor_pairs(key_list=None)

Get the specified activity processor pairs. Pairs are returned as a dictionary where the key of the dict is the activity processor’s key and the dict’s associated value is the activity processor’s path.

If no key list is specified, all of the defiend activity processor pairs are returned.

get_group_activity_processor_pairs(group_key)

Get the specified activity processor pairs with the specified group key.

open(filename)

Open the specified configuration file.

remove(key)

Remove the specified activity processor by its key.

remove_group(group_key)

Remove the specified activity processors by their group key.

save()

Save the changes made.

sidewalk.core.manager.get_conf(path)

Get the path of the requested configuration file.

Project Versions

Sidewalk allows you to easily trigger the execution of sets of Python methods from the command-line.

Useful Links

Table Of Contents

Previous topic

conf Package

Next topic

test Package