ecs_files_composer.jinja2_filters package

Module contents

Package allowing to expand the Jinja filters to use.

ecs_files_composer.jinja2_filters. define_metadata ( for_task = False ) [source]
ecs_files_composer.jinja2_filters. ecs_container_metadata ( property_key = None , fallback_value = None ) [source]
ecs_files_composer.jinja2_filters. ecs_task_metadata ( property_key = None , fallback_value = None ) [source]
ecs_files_composer.jinja2_filters. env_override ( value , key ) [source]

Function to use in new Jinja filter :param value: :param key: :return:

ecs_files_composer.jinja2_filters. env_var ( key , value = None ) [source]
ecs_files_composer.jinja2_filters. from_dict_to_simple_keys ( top_key , new_mapping , to_convert ) [source]
Parameters
  • top_key ( str ) –

  • new_mapping ( dict ) –

  • to_convert ( dict ) –

Returns

ecs_files_composer.jinja2_filters. from_list_to_dict ( top_key , new_mapping , to_convert ) [source]
Parameters
  • top_key ( str ) –

  • new_mapping ( dict ) –

  • to_convert ( list ) –

Returns

ecs_files_composer.jinja2_filters. from_metadata_to_flat_keys ( metadata ) [source]

Function to transform the metadata into simplified structure :param dict metadata: :return:

ecs_files_composer.jinja2_filters. get_property ( metadata , property_key ) [source]
ecs_files_composer.jinja2_filters. to_json ( value , indent = 2 ) [source]
ecs_files_composer.jinja2_filters. to_yaml ( value ) [source]

Filter to render input to YAML formatted content :return: