[BOLT-906] Boilerplate Python code Created: 2018/10/05  Updated: 2018/10/29  Resolved: 2018/10/18

Status: Resolved
Project: Puppet Task Runner
Component/s: None
Affects Version/s: None
Fix Version/s: BOLT 1.2.0

Type: New Feature Priority: Normal
Reporter: Alex Dreyer Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: docs, docs-reviewed, feature
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Shareable task code
Sprint: Bolt Kanban
Release Notes: New Feature
Release Notes Summary: Bolt now includes a helper class for writing python tasks. See the docs for details.
QA Risk Assessment: Needs Assessment


Create a core python library for tasks. Users who use the library should be able to write a single function that accepts parsed params and returns a dict. Targeting Python 2.7+.


  • Users extends class with a single function that performs the task. params input and output are dicts.
  • Users adds if name == _main_ TaskClass.run()
  • Any unhandled errors are caught and turned into an error response
  • Base exception class to make generating a proper error easy
  • Example showing proper unit testing.

Add notes about this module to Bolt docs and include in the Puppetfile.

Comment by Michael Smith [ 2018/10/17 ]


  • make README more consistent with ruby_task_helper
  • note expected input_method: stdin in README
  • release module
  • add to Bolt with docs
Generated at Mon Dec 09 14:10:12 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.