Description
Sidewalk - Run Python Methods from the Command Line
Sidewalk is a handy tool that allows you to trigger the execution of Python methods directly from the command line. You can easily register your activity processor, which can be any method from any module, and then run it using the included command-line utilities: sidewalk-conf.py and sidewalk-pave.py.
Why Use Sidewalk?
Sidewalk is especially useful when you need to set up cron jobs to automatically execute your Python code. You can set up multiple cron job entries to run at different times and trigger various activity processors.
Getting Started with Sidewalk
While formal documentation is still pending, here's a quick guide to help you start using Sidewalk:
Step 0: Create an Activity Processor
- Your activity processor can be any function defined in any module.
- It's recommended to create a local package to organize all your activity processors in one place.
- Sidewalk comes with a package called sidewalk_activity_processors for your convenience.
- A sample activity processor called 'hello' can be found in the 'example' module of this package.
Step 1: Register Your Activity Processor
To register your activity processor, use the following command:
sidewalk-conf.py --add 'example.hello sidewalk_activity_processors.example.hello'
Using the sidewalk-conf.py utility, you can easily add, view, and remove activity processors. By adding an activity processor, you create a key association. Remember to use the correct syntax ('example.hello') where 'example' is the group name and 'hello' is the specific processor name.
Step 2: Execute Your Activity Processor
Execute your processor by running:
sidewalk-pave.py --activity-processor 'example.hello'
You can run multiple activity processors in one go or select them based on groups.
Installing Sidewalk
To install Sidewalk, simply download the source package from the link provided and run the following command in the unzipped or untarred directory:
python setup.py install
User Reviews for Sidewalk FOR LINUX 7
-
Sidewalk for Linux simplifies executing Python methods via command-line. Useful for setting up scheduled cron jobs. Formal documentation pending.
-
Sidewalk is an absolute game changer for executing Python methods! It's simple to set up and incredibly efficient.
-
I love how easy Sidewalk makes it to manage cron jobs with Python. The command-line utilities are straightforward and powerful!
-
Fantastic app! Sidewalk has streamlined my workflow, allowing me to trigger Python functions effortlessly from the command line.
-
Sidewalk is a must-have for anyone working with Python. Its ability to register and execute activity processors is super handy!
-
I can't recommend Sidewalk enough! It simplifies running scheduled tasks in Python, making my life so much easier.
-
What a brilliant tool! Sidewalk's functionality for managing activity processors is spot on, making automation a breeze.