Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num Call AttributeLoad Call NameLoad attr NameLoad NameLoad If CompareNotIn Str NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareNotIn Str NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore DictComp NameLoad Str comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Call NameLoad Str attr NameLoad orelse Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults Call NameLoad NameLoad body If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr BoolOpOr UnaryOpNot NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareEq SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Index Num SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Yield Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad NameLoad NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Yield Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad With Call NameLoad NameLoad NameLoad NameStore body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad With Call NameLoad NameLoad Str NameStore body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore IfExp NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad BinOpAdd AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad BinOpAdd AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A 
All filesystem interaction.
 N/A logging N/A os N/A parse pathlib Path string Formatter collections namedtuple N/A errors N/A SUBJECT_EXTENSION .subject N/A TEXT_EXTENSION .text N/A HTML_EXTENSION .html N/A Email N/A namedtuple Email N/A name locale path full_path N/A logger N/A N/A logging getLogger _parse_params N/A N/A pattern N/A N/A N/A params N/A p N/A p N/A map N/A N/A N/A e N/A N/A e N/A 1 N/A N/A N/A Formatter parse pattern p N/A N/A name params N/A N/A N/A N/A errors MissingPatternParamError N/A N/A {{name}} is a required parameter in the pattern but it is not present in {} format pattern N/A N/A locale params N/A N/A N/A N/A errors MissingPatternParamError N/A N/A {{name}} is a required parameter in the pattern but it is not present in {} format pattern N/A params N/A _emails N/A N/A src_dir pattern params exclusive_path N/A None N/A N/A wildcard_params N/A k * N/A k params N/A wildcard_pattern N/A N/A pattern format wildcard_params N/A parser N/A N/A parse compile pattern N/A exclusive_path N/A N/A glob_path N/A N/A N/A Path . glob exclusive_path N/A N/A glob_path N/A N/A N/A Path src_dir glob wildcard_pattern N/A path N/A sorted glob_path key N/A N/A N/A path N/A N/A str path N/A N/A N/A N/A N/A N/A path is_dir N/A N/A exclusive_path N/A _has_correct_ext path pattern N/A N/A str_path N/A str N/A N/A path relative_to src_dir N/A result N/A N/A parser parse str_path N/A N/A N/A result named N/A path str_path N/A N/A N/A result named N/A full_path N/A str N/A N/A path resolve N/A N/A N/A logging debug loading email %s N/A N/A result named N/A full_path N/A N/A result N/A _has_correct_ext N/A N/A path pattern N/A N/A N/A N/A N/A N/A N/A N/A os path splitext N/A str path N/A 1 N/A N/A N/A N/A os path splitext pattern N/A 1 N/A emails N/A N/A src_dir pattern exclusive_path N/A None N/A N/A 
    Resolves a pattern to a collection of emails. The pattern needs to have 'name' and 'locale' as this is used later
    to produce the results.

    :param src_dir: base dir for the search
    :param pattern: search pattern
    :exclusive_path: single email path, glob path for emails subset or None to not affect emails set

    :returns: generator for the emails matching the pattern
     N/A params N/A _parse_params pattern N/A result N/A _emails src_dir pattern params exclusive_path N/A N/A N/A N/A Email N/A result named N/A email N/A N/A src_dir pattern email_name locale N/A None N/A N/A 
    Gets an email by name. Used for clients which should produce a single file for all locales.

    :param src_dir: base dir for the search
    :param pattern: search pattern
    :param email_name: email name
    :param locale: locale name or None for all locales

    :returns: generator for the emails with email_name
     N/A single_email_pattern N/A N/A pattern replace {name} email_name N/A locale N/A N/A single_email_pattern N/A N/A single_email_pattern replace {locale} locale N/A params N/A _parse_params pattern N/A result N/A _emails src_dir single_email_pattern params N/A N/A N/A N/A result named N/A name email_name N/A locale N/A N/A N/A N/A result named N/A locale locale N/A N/A N/A Email N/A result named N/A read_file N/A N/A N/A path_parts kwargs N/A N/A 
    Helper for reading files
     N/A path N/A N/A N/A os path join path_parts N/A N/A N/A logger debug reading file from %s path N/A N/A open path kwargs fp N/A N/A N/A N/A fp read N/A save_file N/A N/A content N/A path_parts N/A N/A 
    Helper for saving files
     N/A path N/A N/A N/A os path join path_parts N/A N/A N/A logger debug saving file to %s path N/A N/A open path w fp N/A N/A N/A N/A fp write content N/A save N/A N/A email subject text html dest_dir fallback_locale N/A None N/A N/A 
    Saves an email. The locale and name are taken from email tuple.

    :param email: Email tuple
    :param subject: email's subject
    :param text: email's body as text
    :param html: email's body as html
    :param dest_dir: root destination directory
     N/A locale N/A fallback_locale fallback_locale N/A email locale N/A N/A N/A os makedirs N/A N/A N/A os path join dest_dir locale exist_ok True N/A N/A save_file subject dest_dir locale N/A N/A email name SUBJECT_EXTENSION N/A N/A save_file text dest_dir locale N/A N/A email name TEXT_EXTENSION N/A N/A save_file html dest_dir locale N/A N/A email name HTML_EXTENSION N/A