freckles.frecklet package

Submodules

freckles.frecklet.arguments module

class freckles.frecklet.arguments.CliArgumentsAttribute(target_attr_name='cli_arguments', source_attr_name='vars')[source]

Bases: ting.ting_attributes.TingAttribute

DEFAULT_CLI_SCHEMA = {'param_type': 'option', 'show_default': True}
create_parameter(var_name, var)[source]
get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.arguments.VariablesAttribute(target_attr_name='vars_frecklet', default_argument_description=None)[source]

Bases: ting.ting_attributes.TingAttribute

consolidate_vars(vars_tree, ting)[source]
create_new_args_map(parent_var, key, available_args, arg)[source]
get_attribute(ting, attribute_name=None)[source]
get_vars_from_path(path_to_leaf, tree, ting)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

resolve_vars(current_args, rest_path, last_node, tree, ting, is_root_level)[source]
class freckles.frecklet.arguments.VariablesFilterAttribute(source_attr_name='vars', target_attr_name='vars_required', required=True)[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.arguments.VarsAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

freckles.frecklet.describe module

freckles.frecklet.describe.create_auto_vars(params, existing_vars={}, frecklet=None)[source]
freckles.frecklet.describe.describe_frecklet(context, frecklet, vars, auto_vars=False)[source]
freckles.frecklet.describe.print_task_descriptions(task_desc_list)[source]

freckles.frecklet.doc module

class freckles.frecklet.doc.FreckletDocRenderMixin(*args, **kwargs)[source]

Bases: object

render_doc(template_name)[source]
freckles.frecklet.doc.create_doc_jinja_env(name, template_dir, template_filters=None)[source]
freckles.frecklet.doc.render_html(frecklet)[source]
freckles.frecklet.doc.render_markdown(frecklet)[source]
freckles.frecklet.doc.to_cli_help_string_filter(frecklet)[source]
freckles.frecklet.doc.to_code_block_filter(obj, format=None)[source]
freckles.frecklet.doc.to_repo_alias_filter(frecklet)[source]
freckles.frecklet.doc.to_yaml_filter(obj, empty_string=None, indent=0)[source]
freckles.frecklet.doc.vars_markdown_table(vars, vars_optional=None)[source]

freckles.frecklet.frecklet module

class freckles.frecklet.frecklet.FreckletAugmentMetadataAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletClassNameAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletConstArgsAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletConstAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletExplodedAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletHtmlAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletMarkdownAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletMetaAttribute(default=None)[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletSrcAttribute(template_name, target_attr=None)[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletValidAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.FreckletsTemplateKeysAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.PagelingContentAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.PagelingMetadataAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.PagelingNavPathAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.frecklet.PrettyPrintFrecklet[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

freckles.frecklet.frecklet.get_src_template(template_name)[source]

freckles.frecklet.tasks module

class freckles.frecklet.tasks.AddRootFreckletProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.CleanupFreckletProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.CommandNameProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Adds potential missing command/name keys.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.DirectParentArgsProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Adds arguments for ‘direct’ parents.

For example if a frecklet has something like:

  • user-exists:
    name: “{{:: name ::}}”

Where the variable name stays the same, and no filter is involved, the args will be inherited directly.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.ExplodedArgsProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Sets the exploded args property.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.FreckletsAttribute[source]

Bases: ting.ting_attributes.ValueAttribute

get_attribute(ting, attribute_name=None)[source]
class freckles.frecklet.tasks.MoveEmbeddedTaskKeysProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Moves keys that start with __task__ from the vars to the task sub-dict.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.NodeCounter[source]

Bases: object

current_count
up()[source]
class freckles.frecklet.tasks.SpecialCaseProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Makes sure that no keywords are in vars.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
class freckles.frecklet.tasks.TaskListAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.tasks.TaskListDetailedAttribute[source]

Bases: ting.ting_attributes.TingAttribute

FRECKLET_FORMAT = {'child_marker': 'frecklets', 'default_leaf': 'frecklet', 'default_leaf_key': 'name', 'key_move_map': {'*': ('vars', 'default')}, 'other_keys': ['args', 'doc', 'meta', 'frecklet', 'task'], 'use_context': False}
get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.tasks.TaskListResolvedAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.tasks.TaskTreeAttribute[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.tasks.TaskTypePrefixProcessor(**init_params)[source]

Bases: frkl.processors.ConfigProcessor

Adds a ‘become’: True key/value pair if the task name is all uppercase.

process_current_config()[source]

Processes the config url or content.

Returns:processed config url or content
Return type:object
freckles.frecklet.tasks.fill_defaults(task_item)[source]
freckles.frecklet.tasks.prettyfiy_task(task_detailed, arg_map)[source]

freckles.frecklet.vars module

class freckles.frecklet.vars.AskVarAdapter[source]

Bases: freckles.frecklet.vars.VarAdapter

A var-adapter that asks the user to enter the value for this variable interactively.

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.FreckletDirVarAdapter[source]

Bases: freckles.frecklet.vars.VarAdapter

An adapter that returns the path to the parent directory of the frecklet that is currently executed.

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.FreckletPathVarAdapter[source]

Bases: freckles.frecklet.vars.VarAdapter

An adapter that returns the path to the frecklet that is currently executed.

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.Inventory[source]

Bases: object

get_vars(hide_secrets=False, **task_context)[source]
retrieve_value(var_name, **task_context)[source]
secret_keys(**task_context)[source]
set_value(var_name, new_value, is_secret=False, **task_context)[source]
class freckles.frecklet.vars.PwdVarAdapter[source]

Bases: freckles.frecklet.vars.VarAdapter

An adapter that returns the current directory on the machine where freckles is executed.

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.RandomPasswordVarAdapter[source]

Bases: freckles.frecklet.vars.VarAdapter

A variable adapter that returns a random password string.

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.VarAdapter[source]

Bases: object

retrieve_value(key_name, arg, root_arg, frecklet, is_secret=False, profile_names=None)[source]
class freckles.frecklet.vars.VarCast(prefix)[source]

Bases: ting.ting_cast.TingCast

VAR_ATTRS = []
class freckles.frecklet.vars.VarPathAttribute(prefix)[source]

Bases: ting.ting_attributes.TingAttribute

get_attribute(ting, attribute_name=None)[source]
provides()[source]

Return a list of attributes this object will add to a Ting.

requires()[source]

Return an list of attributes this object requires to be able to augment the Ting.

class freckles.frecklet.vars.VarsInventory(vars=None, secret_keys=None)[source]

Bases: freckles.frecklet.vars.Inventory

retrieve_value(var_name, **task_context)[source]
secret_keys(**task_context)[source]
set_value(var_name, new_value, is_secret=False, **task_context)[source]
freckles.frecklet.vars.get_resolved_var_adapter_object(value, key, arg, root_arg=True, frecklet=None, is_secret=None, inventory=None)[source]

Replaces string in object recursively, non-jinja-termplate version.

Parameters:
  • value – the object
  • key – the string to be replaced
  • repl – the replacement string
Returns:

the replaced object, and a boolean that indicates whether there was any change or not

Return type:

tuple

freckles.frecklet.vars.get_value_from_var_adapter(var_adapter_name, key, arg, root_arg, frecklet=None, is_secret=None, inventory=None)[source]
freckles.frecklet.vars.get_value_from_var_adapter_string(value, key, arg, root_arg=True, frecklet=None, is_secret=None, inventory=None)[source]
freckles.frecklet.vars.is_var_adapter(value)[source]
freckles.frecklet.vars.load_var_adapters()[source]

Loading a dictlet finder extension.

Returns:the extension manager holding the extensions
Return type:ExtensionManager

Module contents