MCPcopy Create free account

hub / github.com/cdgriffith/Box / functions

Functions897 in github.com/cdgriffith/Box

↓ 155 callersMethodto_dict
Turn the Box and sub Boxes back into a native python dictionary. :return: python dictionary of this Box
box/box.py:1114
↓ 71 callersMethodget
(self, key, default=NO_DEFAULT)
box/box.py:568
↓ 62 callersMethodfrom_yaml
Transform a yaml object string into a Box object. By default will use SafeLoader. :param yaml_string: string to pass to `yam
box/box.py:1416
↓ 51 callersMethodget_comment
Return the comments of `key` as ``{"before": text, "eol": text}`` (a position without a comment is left out), or None. ``key=None`` r
box/box.py:921
↓ 45 callersMethodappend
(self, p_object)
box/box_list.py:207
↓ 45 callersMethodpop
(self, key, *args)
box/box.py:1060
↓ 43 callersMethodupdate
(self, *args, **kwargs)
box/box.py:1132
↓ 42 callersMethodcopy
(self)
box/box.py:591
↓ 42 callersMethodto_yaml
Transform the Box object into a YAML string. :param filename: If provided will save to file :param default_flow
box/box.py:1383
↓ 37 callersMethodset_comment
Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or "before" (lines above the key, may contain n
box/box.py:929
↓ 35 callersMethodkeys
(self, dotted: bool = False)
box/box.py:536
↓ 34 callersMethodto_list
(self)
box/box_list.py:449
↓ 31 callersMethodmerge_update
Recursively update the Box, merging nested dictionaries instead of overwriting them like the built-in ``dict.update``. The `
box/box.py:1151
↓ 25 callersMethoditems
(self, dotted: bool = False)
box/box.py:559
↓ 21 callersMethodfrom_json
Transform a json object string into a Box object. If the incoming json is a list, you must use BoxList.from_json. :param jso
box/box.py:1351
↓ 18 callersMethodsetdefault
(self, item, default=None)
box/box.py:1254
↓ 17 callersMethodset_comment
Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or "before" (lines above the key, may contain n
box/box_list.py:372
↓ 16 callersFunction_no_create_box
(**kwargs)
test/test_box.py:2163
↓ 16 callersMethodextend
(self, iterable)
box/box_list.py:211
↓ 14 callersFunctionannotated
(**options)
test/test_audit_sync.py:31
↓ 14 callersMethodpop
(self, index=-1)
box/box_list.py:227
↓ 14 callersMethodto_json
Transform the Box object into a JSON string. :param filename: If provided will save to file :param encoding: File encoding
box/box.py:1332
↓ 12 callersMethod__box_config
(self, extra_namespace: Any = NO_NAMESPACE)
box/box.py:708
↓ 12 callersMethodget_comment
Return the comments of `key` as ``{"before": text, "eol": text}`` (a position without a comment is left out), or None. ``key=None`` r
box/box_list.py:364
↓ 11 callersFunction_exists
(filename: str | PathLike, create: bool = False)
box/converters.py:113
↓ 11 callersMethodpopitem
(self)
box/box.py:1091
↓ 10 callersMethod__getitem__
(self, item, _ignore_default=False)
box/box.py:781
↓ 10 callersMethod__setitem__
(self, key, value)
test/test_update_insertion.py:71
↓ 10 callersMethod_safe_attr
Convert a key into something that is accessible as an attribute
box/box.py:1265
↓ 10 callersFunctioncheck_comments
A comment, wherever it is, must be the one of the item now at that position, and every item id in `kept` must still have its comment.
test/test_audit_sync.py:42
↓ 10 callersMethodclear
(self)
box/box.py:1084
↓ 10 callersMethodfrom_toon
Transforms a TOON string or file into a Box object :param toon_string: string to pass to `toon_format.decode` :p
box/box.py:1605
↓ 9 callersFunction_parse_box_dots
Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.
box/box.py:193
↓ 9 callersMethodinsert
(self, index, p_object)
box/box_list.py:218
↓ 8 callersMethod__setitem__
(self, key, value)
box/box.py:949
↓ 8 callersMethod_comment_document
(self, create: bool = True)
box/box.py:871
↓ 7 callersMethod__contains__
(self, item)
box/box.py:511
↓ 7 callersMethod_comment_check_frozen
(self)
box/box_list.py:274
↓ 7 callersMethod_comment_store
(self, create: bool = True)
box/box.py:865
↓ 7 callersFunctionbox_from_string
Parse the provided string into a Box or BoxList object as appropriate. :param content: String to parse :param string_type: manually spec
box/from_file.py:136
↓ 7 callersFunctioncheck_converted
(bl, **options)
test/test_audit_sync.py:59
↓ 7 callersMethoddel_comment
Remove every comment of `key` (``None``: the document comments).
box/box.py:937
↓ 7 callersFunctiondots_box
(**options)
test/test_audit_sync.py:366
↓ 7 callersMethodfrom_msgpack
Transforms msgpack bytes or file into a Box object :param msgpack_bytes: string to pass to `msgpack.unpackb` :pa
box/box.py:1548
↓ 7 callersMethodfrom_toml
Transforms a toml string or file into a Box object :param toml_string: string to pass to `toml.load` :param file
box/box.py:1496
↓ 7 callersMethodmerge_update
(self, *args, **kwargs)
box/config_box.py:198
↓ 7 callersMethodsort
(self, *, key=None, reverse=False)
box/box_list.py:249
↓ 7 callersMethodupdate
(self, *args, **kwargs)
box/config_box.py:177
↓ 6 callersMethod__contains__
(self, item)
box/config_box.py:149
↓ 6 callersMethod__process_dotted_key
(self, item)
box/box.py:642
↓ 6 callersFunction_camel_killer
CamelKiller, qu'est-ce que c'est? Taken from http://stackoverflow.com/a/1176023/3244542
box/box.py:75
↓ 6 callersFunction_make_internal
()
test/test_box.py:1860
↓ 6 callersMethodbool
Return value of key as a boolean :param item: key of value to transform :param default: value to return if item does not exi
box/config_box.py:231
↓ 6 callersMethodint
Return value of key as an int :param item: key of value to transform :param default: value to return if item does not exist
box/config_box.py:255
↓ 6 callersMethoditems
()
test/test_box_list.py:96
↓ 6 callersMethodreverse
(self)
box/box_list.py:243
↓ 6 callersMethodto_json
Transform the BoxList object into a JSON string. :param filename: If provided will save to file :param encoding: File encodi
box/box_list.py:462
↓ 6 callersMethodto_msgpack
Transform the Box object into a msgpack string. :param filename: File to write msgpack object too :param kwargs:
box/box.py:1537
↓ 6 callersMethodto_toon
Transform the Box object into a TOON string. :param filename: File to write TOON object too :param encoding: Fil
box/box.py:1590
↓ 5 callersMethod__dots_int_key
A segment of a box_dots path made of digits also matches the int key with that value, so "a.2" reaches {"a": {2: ...}} (#123). Only u
box/box.py:620
↓ 5 callersMethod__getattr__
(self, item)
box/box.py:822
↓ 5 callersMethod_comment_reindex
(self, mapping)
box/box_list.py:278
↓ 5 callersMethod_convert
(self, p_object)
box/box_list.py:192
↓ 5 callersFunction_exception_cause
Unwrap BoxKeyError and BoxValueError errors to their cause. Use with `raise ... from _exception_cause(err)` to avoid deeply nested stacktrac
box/box.py:65
↓ 5 callersFunction_from_toml
( toml_string: str | None = None, filename: str | PathLike | None = None, encoding: str = "utf-8",
box/converters.py:328
↓ 5 callersFunctionbox_from_file
Loads the provided file and tries to parse it into a Box or BoxList object as appropriate. :param file: Location of file :param encoding
box/from_file.py:108
↓ 5 callersMethodremove
(self, value)
box/box_list.py:235
↓ 5 callersMethodto_toml
Transform the Box object into a toml string. :param filename: File to write toml object too :param encoding: Fil
box/box.py:1477
↓ 4 callersMethod__camel_destructive
camel_killer_box renames keys to snake_case unless camel_killer_box_keep_keys is set
box/box.py:638
↓ 4 callersMethod_ci_after_write
Update the index after `key` was written or deleted through ConfigBox.
box/config_box.py:87
↓ 4 callersMethod_ci_key
Return the stored key equal to `key` ignoring case, or None. Only str keys are matched.
box/config_box.py:58
↓ 4 callersMethod_ci_resolve
Return the key to use for `key`: the stored spelling if one matches, `key` otherwise.
box/config_box.py:69
↓ 4 callersMethod_comment_copy_to
(self, other, offset=0, document=True)
box/box_list.py:352
↓ 4 callersMethod_comment_owner
(container, key) that holds the comment for `key`, following box_dots paths.
box/box.py:891
↓ 4 callersFunction_to_toml
(obj, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict")
box/converters.py:314
↓ 4 callersMethodlist
Return value of key as a list :param item: key of value to transform :param mod: function to map against list :param
box/config_box.py:287
↓ 3 callersMethod__delitem__
(self, key)
box/box.py:1000
↓ 3 callersMethod__delitem__
(self, key)
box/config_box.py:170
↓ 3 callersMethod__get_default
(self, item)
box/box.py:650
↓ 3 callersMethod__getitem__
(self, item, _ignore_default=False)
box/box_list.py:68
↓ 3 callersMethod__setattr__
(self, key, value)
box/box.py:980
↓ 3 callersMethod__setitem__
(self, key, value)
box/config_box.py:155
↓ 3 callersMethod_ci_check_frozen
(self)
box/config_box.py:110
↓ 3 callersMethod_ci_take_over
Remove a stored key that differs from `key` only by case, so `key` replaces it. With keep_value its value is stored again under the n
box/config_box.py:114
↓ 3 callersMethod_comment_copy_to
(self, other)
box/box.py:909
↓ 3 callersMethod_flush_pending_parent
With `default_box_create_on_get=False` a missing key returns an ephemeral child Box that is not stored in its parent. The first time
box/box.py:842
↓ 3 callersFunction_ruamel_to_builtin
Convert ruamel.yaml numeric and boolean scalar types to plain Python builtins. ScalarFloat/ScalarInt survive Box.to_dict() and break serializers
box/converters.py:222
↓ 3 callersFunction_to_json
( obj, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict", **json_kwa
box/converters.py:129
↓ 3 callersFunction_to_msgpack
(obj, filename: str | PathLike | None = None, **kwargs)
box/converters.py:345
↓ 3 callersFunction_token_lines
Comment token text to comment lines without the "#", blank lines kept as "".
box/comments.py:42
↓ 3 callersMethodfrom_csv
( cls, csv_string: str | None = None, filename: str | PathLike | None = None,
box/box_list.py:814
↓ 3 callersFunctionfrozen_annotated
(**options)
test/test_audit_sync.py:38
↓ 3 callersMethodto_csv
(self, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict")
box/box_list.py:810
↓ 3 callersMethodto_toon
Transform the BoxList object into a TOON string. :param filename: File to write TOON object too :param encoding:
box/box_list.py:749
↓ 2 callersMethod__copy__
(self)
box/box.py:596
↓ 2 callersMethod__copy_internals
Carry instance-only attributes listed in `_box_internal_attrs`, and comments, over to `new`.
box/box.py:582
↓ 2 callersMethod__init__
(self, iterable: Iterable | None = None, box_class: type[box.Box] = box.Box, **box_options)
box/box_list.py:56
↓ 2 callersMethod__ior__
(self, other: Mapping[Any, Any])
box/box.py:459
↓ 2 callersMethod__new_from_plain
A Box of this box's class and options (unfrozen, top level) holding a plain dict's data
box/box.py:428
↓ 2 callersMethod__ror__
(self, other: Mapping[Any, Any])
box/box.py:450
next →1–100 of 897, ranked by callers