Skip to main content

The Simple Activity Aggregator.

Project description

Sidewalk: Simple Activity Aggregator
====================================

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

Simply register your activity processors (i.e. functions/methods) with key associations and execute them by key or group using the included command-line utility ``sidewalk``.

This comes in handy when you want to setup cron jobs to execute Python code. You can easily create multiple cron job entries that run at various times and call different sets of activity processors.


Documentation and Getting Started
---------------------------------

Formal documentation is available on `Read the Docs <http://sidewalk.readthedocs.org/en/latest/>`_ and is also located in the ``docs/`` directory of the source code.

Here is a quick run-down for how to get started:

**Step 0) Create an activity processor.**

- This can be any function defined in any module.
- It is common to create an ``activitiy_processors/`` directory in your project's main directory to hold all of the activity processors specific to that project. This directory is also typically used to the project's Sidewalk configuration file (see Step 1 below).
- Note Sidewalk comes with an example activitiy processor ``hello`` in the module ``sidewalk.test.example``.

**Step 1) Create a configuration file:**

Before we can register our activity processors, we need to create and initialize a configurationfile. This file will contain a list of registered activity processors. It is up to you where to put the configuration file. You can create a single configuration file for an entire system, or create one for each of your projects. For right now, lets just create one in the current working directory:

::

$ sidewalk ./sidewalk.conf init

**Step 2) Register your activity processor:**

::

$ sidewalk ./sidewalk.conf add example.hello sidewalk.test.example.hello

- The ``sidewalk`` command-line utility is your way to easily add, list/view, and remove activity processors.
- Note that when adding your activity processors, you are creating a key association to the activity processor. Also note the syntax: ``example.hello``, in this case, ``example`` is the group and ``hello`` is the name. Groups are useful for executing multiple activity processors in one go. See step 3 below for more information.

**Step 3) Execute your activity processor:**

::

$ sidewalk ./sidewalk.conf pave example.hello

- Here we are executing our activity processor ``example.hello``.
- You can select activity processors by group, e.g.: ``$ sidewalk ./sidewalk.conf pave example.``.
- You can execute any number of activity processors in one call, e.g.: ``$ sidewalk ./sidewalk.conf pave example.`` to execute all activity processors of group ``example`` or ``$ sidewalk ./sidewalk.conf pave
example.hello second_group.`` to execute ``example.hello`` and all activity processors of group ``second_group``.


Installation
------------

Install Sidewalk via `pip <http://pypi.python.org/pypi/pip/>`_:

::

$ pip install sidewalk

If needed, other methods of installing Sidewalk are noted in the `documentation <http://readthedocs.org/projects/sidewalk/>`_.


Links
-----

- `Sidewalk on PyPI <http://pypi.python.org/pypi/sidewalk>`_
- `Sidewalk on GitHub <https://github.com/blakerohde/sidewalk>`_
- `Issue Tracker <https://github.com/blakerohde/sidewalk/issues>`_

Authors
-------

`Blake Rohde <http://www.blakerohde.com/>`_


History
-------

0.3.0 (2013-01-19)
++++++++++++++++++

- New and improved command-line interface. Legacy CLI is not supported. Sorry. See the documentation or execute ``sidewalk --help`` for more information. The CLI should not change in the future.
- Greatly improved error handling and logging; added ``traceback`` output for unhandled exceptions, i.e. exceptions caused by activity processors or bad refences to activity processors.
- Moved locations of ``bin/`` and the core libs into ``sidewalk/bin`` and ``sidewalk/core``, respectively.
- Updated documentation and README.

0.2.0 (2012-06-30)
++++++++++++++++++

- New Makefile for easier development testing
- Sidewalk is production-ready; bumped version to 0.2.0
- Documentation is now available under ``docs/``
- Specifying a 'custom' settings file is now required; see the documentation for more information on this

0.1.1 (2012-03-08)
++++++++++++++++++

- Moved log functions into new module ``sidewalk.loggers``
- Added exception for when custom settings file's don't have the required section(s)
- ``sidewalk-conf.py --list`` now returns a sorted list

0.1.0 (2012-03-08)
++++++++++++++++++

- Updated README to better represent what it is that Sidewalk actually does
- Added basic log functions and made error messages prettier
- Created ``sidewalk.exceptions`` module and associated exceptions
- Unhandled exceptions thrown by rogue activity processors are now caught
- ``sidewalk-conf.py`` no longer rewrites configuration file if only ``--list`` is requested
- Can now specify filename in ``sidewalk-conf.py`` and ``sidewalk-pave.py`` to use custom Sidewalk settings file/location

0.0.1 (2012-03-04)
++++++++++++++++++

- Initial release
- Wanted initial commit message to read "Pikachu I commit you!" but I flubbed it up and put "Pikachu I choose you!" Oh well.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sidewalk-0.3.0.tar.gz (10.4 kB view details)

Uploaded Source

File details

Details for the file sidewalk-0.3.0.tar.gz.

File metadata

  • Download URL: sidewalk-0.3.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sidewalk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ecc400037b15fcb9759f887ed241473e2c3c8fe3711b4e7cb62caa0ac63182f1
MD5 d0da4e9e693cacd3e3fdb3ee97c19d7b
BLAKE2b-256 ff8ac3d259400bb876b1789759fd72a21fa060ab66a702da42a9558101a1f3ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page