MCPcopy Create free account

hub / github.com/cdgriffith/Box / functions

Functions995 in github.com/cdgriffith/Box

↓ 187 callersMethodto_dict
Turn the Box and sub Boxes back into a native python dictionary. :return: python dictionary of this Box
box/box.py:1125
↓ 79 callersMethodget
(self, key, default=NO_DEFAULT)
box/box.py:577
↓ 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:1433
↓ 53 callersMethodappend
(self, p_object)
box/box_list.py:214
↓ 53 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:927
↓ 48 callersMethodupdate
(self, *args, **kwargs)
box/box.py:1143
↓ 46 callersMethodpop
(self, key, *args)
box/box.py:1071
↓ 43 callersMethodcopy
(self)
box/box.py:600
↓ 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:1400
↓ 38 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:935
↓ 37 callersMethodmerge_update
Recursively update the Box, merging nested dictionaries instead of overwriting them like the built-in ``dict.update``. The `
box/box.py:1164
↓ 36 callersMethodto_list
(self)
box/box_list.py:459
↓ 33 callersMethodkeys
(self, dotted: bool = False)
box/box.py:545
↓ 25 callersMethoditems
(self, dotted: bool = False)
box/box.py:568
↓ 22 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:1368
↓ 19 callersMethodsetdefault
(self, item, default=None)
box/box.py:1271
↓ 18 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:379
↓ 16 callersFunction_no_create_box
(**kwargs)
test/test_box.py:2228
↓ 16 callersMethodextend
(self, iterable)
box/box_list.py:218
↓ 16 callersMethodpop
(self, index=-1)
box/box_list.py:234
↓ 15 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:1349
↓ 14 callersFunctionannotated
(**options)
test/test_audit_sync.py:31
↓ 13 callersMethod__box_config
(self, extra_namespace: Any = NO_NAMESPACE)
box/box.py:718
↓ 12 callersMethod_safe_attr
Convert a key into something that is accessible as an attribute
box/box.py:1282
↓ 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:371
↓ 11 callersFunction_exists
(filename: str | PathLike, create: bool = False)
box/converters.py:113
↓ 11 callersMethodclear
(self)
box/box.py:1095
↓ 11 callersMethodpopitem
(self)
box/box.py:1102
↓ 11 callersMethodupdate
(self, *args, **kwargs)
box/config_box.py:201
↓ 10 callersMethod__getitem__
(self, item, _ignore_default=False)
box/box.py:791
↓ 10 callersMethod__setitem__
(self, key, value)
test/test_strict_box.py:437
↓ 10 callersFunction_parse_box_dots
Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.
box/box.py:193
↓ 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 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:1622
↓ 9 callersMethod__contains__
(self, item)
box/box.py:520
↓ 9 callersMethodinsert
(self, index, p_object)
box/box_list.py:225
↓ 9 callersMethodkeys
(self)
test/test_box.py:261
↓ 8 callersMethod__setitem__
(self, key, value)
box/box.py:955
↓ 8 callersMethod_comment_document
(self, create: bool = True)
box/box.py:877
↓ 8 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
↓ 8 callersMethoditems
()
test/test_box_list.py:96
↓ 7 callersMethod__len__
(self)
test/test_strict_box.py:446
↓ 7 callersFunction_camel_killer
CamelKiller, qu'est-ce que c'est? Taken from http://stackoverflow.com/a/1176023/3244542
box/box.py:75
↓ 7 callersMethod_comment_check_frozen
(self)
box/box_list.py:281
↓ 7 callersMethod_comment_store
(self, create: bool = True)
box/box.py:871
↓ 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:943
↓ 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:1565
↓ 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:1513
↓ 7 callersMethodmerge_update
(self, *args, **kwargs)
box/config_box.py:229
↓ 7 callersMethodsort
(self, *, key=None, reverse=False)
box/box_list.py:256
↓ 6 callersMethod__contains__
(self, item)
box/config_box.py:167
↓ 6 callersMethod__process_dotted_key
(self, item)
box/box.py:651
↓ 6 callersFunction_make_internal
()
test/test_box.py:1925
↓ 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:262
↓ 6 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
↓ 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:286
↓ 6 callersMethodreverse
(self)
box/box_list.py:250
↓ 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:472
↓ 6 callersMethodto_msgpack
Transform the Box object into a msgpack string. :param filename: File to write msgpack object too :param kwargs:
box/box.py:1554
↓ 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:1607
↓ 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:629
↓ 5 callersMethod__getattr__
(self, item)
box/box.py:828
↓ 5 callersMethod__init__
(self, iterable: Iterable | None = None, box_class: type[box.Box] = box.Box, **box_options)
box/box_list.py:56
↓ 5 callersMethod_ci_after_write
Update the index after `key` was written or deleted through ConfigBox.
box/config_box.py:87
↓ 5 callersMethod_ci_key
Return the stored key equal to `key` ignoring case, or None. Only str keys are matched.
box/config_box.py:58
↓ 5 callersMethod_ci_resolve
Return the key to use for `key`: the stored spelling if one matches, `key` otherwise.
box/config_box.py:69
↓ 5 callersMethod_comment_reindex
(self, mapping)
box/box_list.py:285
↓ 5 callersMethod_convert
(self, p_object)
box/box_list.py:199
↓ 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 callersMethodremove
(self, value)
box/box_list.py:242
↓ 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:1494
↓ 4 callersMethod__camel_destructive
camel_killer_box renames keys to snake_case unless camel_killer_box_keep_keys is set
box/box.py:647
↓ 4 callersMethod__setitem__
(self, key, value)
box/config_box.py:173
↓ 4 callersMethod_comment_copy_to
(self, other, offset=0, document=True)
box/box_list.py:359
↓ 4 callersMethod_comment_owner
(container, key) that holds the comment for `key`, following box_dots paths.
box/box.py:897
↓ 4 callersFunction_to_toml
(obj, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict")
box/converters.py:314
↓ 4 callersMethodcopy
(self)
box/box_list.py:413
↓ 4 callersMethodfrom_csv
( cls, csv_string: str | None = None, filename: str | PathLike | None = None,
box/box_list.py:824
↓ 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:318
↓ 3 callersMethod__delitem__
(self, key)
box/config_box.py:194
↓ 3 callersMethod__get_default
(self, item)
box/box.py:659
↓ 3 callersMethod__getitem__
(self, item, _ignore_default=False)
box/box_list.py:75
↓ 3 callersMethod__setattr__
(self, key, value)
box/box.py:991
↓ 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:915
↓ 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:848
↓ 3 callersFunction_get_property_func
Try to get property helper functions of given object and property name. :param obj: object to be checked for property :param key: proper
box/box.py:276
↓ 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 callersMethodclear
(self)
box/box_list.py:245
↓ 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:820
↓ 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:759
↓ 2 callersMethod__copy__
(self)
box/box.py:605
next →1–100 of 995, ranked by callers