piglot.utils.yaml_parser.UniqueKeyLoader

class UniqueKeyLoader(stream)[source]

Bases: SafeLoader

YAML loader that checks for duplicate keys in mappings.

Adapted from https://gist.github.com/pypt/94d747fe5180851196eb.

Methods

add_constructor

add_implicit_resolver

add_indent

add_multi_constructor

add_path_resolver

ascend_resolver

check_block_entry

check_data

check_directive

check_document_end

check_document_start

check_event

check_key

check_node

check_plain

check_printable

check_resolver_prefix

check_state_key

Block special attributes/methods from being set in a newly created object, to prevent user-controlled methods from being called during deserialization

check_token

check_value

compose_document

compose_mapping_node

compose_node

compose_scalar_node

compose_sequence_node

construct_document

construct_mapping

construct_object

construct_pairs

construct_scalar

construct_sequence

construct_undefined

construct_yaml_binary

construct_yaml_bool

construct_yaml_float

construct_yaml_int

construct_yaml_map

construct_yaml_null

construct_yaml_object

construct_yaml_omap

construct_yaml_pairs

construct_yaml_seq

construct_yaml_set

construct_yaml_str

construct_yaml_timestamp

descend_resolver

determine_encoding

dispose

fetch_alias

fetch_anchor

fetch_block_entry

fetch_block_scalar

fetch_directive

fetch_document_end

fetch_document_indicator

fetch_document_start

fetch_double

fetch_flow_collection_end

fetch_flow_collection_start

fetch_flow_entry

fetch_flow_mapping_end

fetch_flow_mapping_start

fetch_flow_scalar

fetch_flow_sequence_end

fetch_flow_sequence_start

fetch_folded

fetch_key

fetch_literal

fetch_more_tokens

fetch_plain

fetch_single

fetch_stream_end

fetch_stream_start

fetch_tag

fetch_value

flatten_mapping

forward

get_data

get_event

get_mark

get_node

get_single_data

get_single_node

get_token

need_more_tokens

next_possible_simple_key

parse_block_mapping_first_key

parse_block_mapping_key

parse_block_mapping_value

parse_block_node

parse_block_node_or_indentless_sequence

parse_block_sequence_entry

parse_block_sequence_first_entry

parse_document_content

parse_document_end

parse_document_start

parse_flow_mapping_empty_value

parse_flow_mapping_first_key

parse_flow_mapping_key

parse_flow_mapping_value

parse_flow_node

parse_flow_sequence_entry

parse_flow_sequence_entry_mapping_end

parse_flow_sequence_entry_mapping_key

parse_flow_sequence_entry_mapping_value

parse_flow_sequence_first_entry

parse_implicit_document_start

parse_indentless_sequence_entry

parse_node

parse_stream_start

peek

peek_event

peek_token

prefix

process_directives

process_empty_scalar

remove_possible_simple_key

resolve

save_possible_simple_key

scan_anchor

scan_block_scalar

scan_block_scalar_breaks

scan_block_scalar_ignored_line

scan_block_scalar_indentation

scan_block_scalar_indicators

scan_directive

scan_directive_ignored_line

scan_directive_name

scan_flow_scalar

scan_flow_scalar_breaks

scan_flow_scalar_non_spaces

scan_flow_scalar_spaces

scan_line_break

scan_plain

scan_plain_spaces

scan_tag

scan_tag_directive_handle

scan_tag_directive_prefix

scan_tag_directive_value

scan_tag_handle

scan_tag_uri

scan_to_next_token

scan_uri_escapes

scan_yaml_directive_number

scan_yaml_directive_value

stale_possible_simple_keys

unwind_indent

update

update_raw

Attributes

DEFAULT_MAPPING_TAG

DEFAULT_SCALAR_TAG

DEFAULT_SEQUENCE_TAG

DEFAULT_TAGS

ESCAPE_CODES

ESCAPE_REPLACEMENTS

NON_PRINTABLE

bool_values

inf_value

nan_value

timestamp_regexp

yaml_constructors

yaml_implicit_resolvers

yaml_multi_constructors

yaml_path_resolvers

check_state_key(key)

Block special attributes/methods from being set in a newly created object, to prevent user-controlled methods from being called during deserialization