Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cdgriffith/Box
/ functions
Functions
995 in github.com/cdgriffith/Box
⨍
Functions
995
◇
Types & classes
115
↳
Endpoints
9
↓ 187 callers
Method
to_dict
Turn the Box and sub Boxes back into a native python dictionary. :return: python dictionary of this Box
box/box.py:1125
↓ 79 callers
Method
get
(self, key, default=NO_DEFAULT)
box/box.py:577
↓ 62 callers
Method
from_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 callers
Method
append
(self, p_object)
box/box_list.py:214
↓ 53 callers
Method
get_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 callers
Method
update
(self, *args, **kwargs)
box/box.py:1143
↓ 46 callers
Method
pop
(self, key, *args)
box/box.py:1071
↓ 43 callers
Method
copy
(self)
box/box.py:600
↓ 42 callers
Method
to_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 callers
Method
set_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 callers
Method
merge_update
Recursively update the Box, merging nested dictionaries instead of overwriting them like the built-in ``dict.update``. The `
box/box.py:1164
↓ 36 callers
Method
to_list
(self)
box/box_list.py:459
↓ 33 callers
Method
keys
(self, dotted: bool = False)
box/box.py:545
↓ 25 callers
Method
items
(self, dotted: bool = False)
box/box.py:568
↓ 22 callers
Method
from_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 callers
Method
setdefault
(self, item, default=None)
box/box.py:1271
↓ 18 callers
Method
set_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 callers
Function
_no_create_box
(**kwargs)
test/test_box.py:2228
↓ 16 callers
Method
extend
(self, iterable)
box/box_list.py:218
↓ 16 callers
Method
pop
(self, index=-1)
box/box_list.py:234
↓ 15 callers
Method
to_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 callers
Function
annotated
(**options)
test/test_audit_sync.py:31
↓ 13 callers
Method
__box_config
(self, extra_namespace: Any = NO_NAMESPACE)
box/box.py:718
↓ 12 callers
Method
_safe_attr
Convert a key into something that is accessible as an attribute
box/box.py:1282
↓ 12 callers
Method
get_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 callers
Function
_exists
(filename: str | PathLike, create: bool = False)
box/converters.py:113
↓ 11 callers
Method
clear
(self)
box/box.py:1095
↓ 11 callers
Method
popitem
(self)
box/box.py:1102
↓ 11 callers
Method
update
(self, *args, **kwargs)
box/config_box.py:201
↓ 10 callers
Method
__getitem__
(self, item, _ignore_default=False)
box/box.py:791
↓ 10 callers
Method
__setitem__
(self, key, value)
test/test_strict_box.py:437
↓ 10 callers
Function
_parse_box_dots
Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.
box/box.py:193
↓ 10 callers
Function
check_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 callers
Method
from_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 callers
Method
__contains__
(self, item)
box/box.py:520
↓ 9 callers
Method
insert
(self, index, p_object)
box/box_list.py:225
↓ 9 callers
Method
keys
(self)
test/test_box.py:261
↓ 8 callers
Method
__setitem__
(self, key, value)
box/box.py:955
↓ 8 callers
Method
_comment_document
(self, create: bool = True)
box/box.py:877
↓ 8 callers
Function
box_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 callers
Method
items
()
test/test_box_list.py:96
↓ 7 callers
Method
__len__
(self)
test/test_strict_box.py:446
↓ 7 callers
Function
_camel_killer
CamelKiller, qu'est-ce que c'est? Taken from http://stackoverflow.com/a/1176023/3244542
box/box.py:75
↓ 7 callers
Method
_comment_check_frozen
(self)
box/box_list.py:281
↓ 7 callers
Method
_comment_store
(self, create: bool = True)
box/box.py:871
↓ 7 callers
Function
check_converted
(bl, **options)
test/test_audit_sync.py:59
↓ 7 callers
Method
del_comment
Remove every comment of `key` (``None``: the document comments).
box/box.py:943
↓ 7 callers
Function
dots_box
(**options)
test/test_audit_sync.py:366
↓ 7 callers
Method
from_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 callers
Method
from_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 callers
Method
merge_update
(self, *args, **kwargs)
box/config_box.py:229
↓ 7 callers
Method
sort
(self, *, key=None, reverse=False)
box/box_list.py:256
↓ 6 callers
Method
__contains__
(self, item)
box/config_box.py:167
↓ 6 callers
Method
__process_dotted_key
(self, item)
box/box.py:651
↓ 6 callers
Function
_make_internal
()
test/test_box.py:1925
↓ 6 callers
Method
bool
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 callers
Function
box_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 callers
Method
int
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 callers
Method
reverse
(self)
box/box_list.py:250
↓ 6 callers
Method
to_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 callers
Method
to_msgpack
Transform the Box object into a msgpack string. :param filename: File to write msgpack object too :param kwargs:
box/box.py:1554
↓ 6 callers
Method
to_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 callers
Method
__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 callers
Method
__getattr__
(self, item)
box/box.py:828
↓ 5 callers
Method
__init__
(self, iterable: Iterable | None = None, box_class: type[box.Box] = box.Box, **box_options)
box/box_list.py:56
↓ 5 callers
Method
_ci_after_write
Update the index after `key` was written or deleted through ConfigBox.
box/config_box.py:87
↓ 5 callers
Method
_ci_key
Return the stored key equal to `key` ignoring case, or None. Only str keys are matched.
box/config_box.py:58
↓ 5 callers
Method
_ci_resolve
Return the key to use for `key`: the stored spelling if one matches, `key` otherwise.
box/config_box.py:69
↓ 5 callers
Method
_comment_reindex
(self, mapping)
box/box_list.py:285
↓ 5 callers
Method
_convert
(self, p_object)
box/box_list.py:199
↓ 5 callers
Function
_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 callers
Function
_from_toml
( toml_string: str | None = None, filename: str | PathLike | None = None, encoding: str = "utf-8",
box/converters.py:328
↓ 5 callers
Method
remove
(self, value)
box/box_list.py:242
↓ 5 callers
Method
to_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 callers
Method
__camel_destructive
camel_killer_box renames keys to snake_case unless camel_killer_box_keep_keys is set
box/box.py:647
↓ 4 callers
Method
__setitem__
(self, key, value)
box/config_box.py:173
↓ 4 callers
Method
_comment_copy_to
(self, other, offset=0, document=True)
box/box_list.py:359
↓ 4 callers
Method
_comment_owner
(container, key) that holds the comment for `key`, following box_dots paths.
box/box.py:897
↓ 4 callers
Function
_to_toml
(obj, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict")
box/converters.py:314
↓ 4 callers
Method
copy
(self)
box/box_list.py:413
↓ 4 callers
Method
from_csv
( cls, csv_string: str | None = None, filename: str | PathLike | None = None,
box/box_list.py:824
↓ 4 callers
Method
list
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 callers
Method
__delitem__
(self, key)
box/config_box.py:194
↓ 3 callers
Method
__get_default
(self, item)
box/box.py:659
↓ 3 callers
Method
__getitem__
(self, item, _ignore_default=False)
box/box_list.py:75
↓ 3 callers
Method
__setattr__
(self, key, value)
box/box.py:991
↓ 3 callers
Method
_ci_check_frozen
(self)
box/config_box.py:110
↓ 3 callers
Method
_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 callers
Method
_comment_copy_to
(self, other)
box/box.py:915
↓ 3 callers
Method
_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 callers
Function
_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 callers
Function
_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 callers
Function
_to_json
( obj, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict", **json_kwa
box/converters.py:129
↓ 3 callers
Function
_to_msgpack
(obj, filename: str | PathLike | None = None, **kwargs)
box/converters.py:345
↓ 3 callers
Function
_token_lines
Comment token text to comment lines without the "#", blank lines kept as "".
box/comments.py:42
↓ 3 callers
Method
clear
(self)
box/box_list.py:245
↓ 3 callers
Function
frozen_annotated
(**options)
test/test_audit_sync.py:38
↓ 3 callers
Method
to_csv
(self, filename: str | PathLike | None = None, encoding: str = "utf-8", errors: str = "strict")
box/box_list.py:820
↓ 3 callers
Method
to_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 callers
Method
__copy__
(self)
box/box.py:605
next →
1–100 of 995, ranked by callers