Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/marin-community/draccus
/ functions
Functions
407 in github.com/marin-community/draccus
⨍
Functions
407
◇
Types & classes
156
Method
help
(self)
draccus/wrappers/field_wrapper.py:273
Function
include_constructor
(loader, node)
draccus/parsers/yaml_loader.py:12
Function
is_bool
(t: Type)
draccus/utils.py:184
Method
is_bool
(self)
draccus/wrappers/field_wrapper.py:308
Function
is_generic_type
(cls: Type[Any])
draccus/parsers/decoding.py:121
Function
is_homogeneous_tuple_type
(t: Type[Tuple])
draccus/utils.py:213
Method
is_literal
Returns True if the field's type is a Literal type.
draccus/wrappers/field_wrapper.py:320
Method
is_optional
(self)
draccus/wrappers/field_wrapper.py:312
Function
is_optional_or_union_with_dataclass_type_arg
(t: Type)
draccus/utils.py:257
Method
iter_namespace
(ns_pkg)
draccus/choice_types.py:200
Function
keep_keys
(d: Dict, keys_to_keep: Iterable[str])
draccus/utils.py:318
Function
load
Load a config from a file path, file object, or string. Args: t: The dataclass type to load into stream: Either a file path,
draccus/cfgparsing.py:82
Method
load_config
(stream)
draccus/parsers/config_parsers.py:46
Method
load_config
(stream)
draccus/parsers/config_parsers.py:71
Method
load_config
(stream)
draccus/parsers/config_parsers.py:97
Function
loads
Load a config from a string. Args: t: The dataclass type to load into s: The string containing the configuration Return
draccus/cfgparsing.py:108
Function
logs_warning
(caplog)
tests/conftest.py:93
Method
name
(self)
draccus/wrappers/wrapper.py:51
Method
name
(self)
draccus/wrappers/dataclass_wrapper.py:87
Method
name
(self)
draccus/wrappers/field_wrapper.py:292
Method
name
(self)
draccus/wrappers/choice_wrapper.py:124
Method
name
(self)
draccus/wrappers/choice_wrapper.py:161
Method
nargs
(self)
draccus/wrappers/field_wrapper.py:202
Method
nesting_level
(self)
draccus/wrappers/wrapper.py:40
Function
no_op
Decoding function that gives back the value as-is.
draccus/parsers/decoding.py:496
Function
no_stdout
Asserts that no output was produced on stdout. Args: capsys (pytest.fixture): The capsys fixture
tests/conftest.py:59
Function
no_warnings
(caplog)
tests/conftest.py:75
Method
option_strings
Generates the `option_strings` argument to the `add_argument` call. `parser.add_argument(*name_or_flags, **arg_options)` ## Notes:
draccus/wrappers/field_wrapper.py:172
Method
parent
(self)
draccus/wrappers/wrapper.py:56
Method
parent
(self)
draccus/wrappers/dataclass_wrapper.py:92
Method
parent
(self)
draccus/wrappers/field_wrapper.py:329
Method
parent
(self)
draccus/wrappers/choice_wrapper.py:48
Method
parent
(self)
draccus/wrappers/choice_wrapper.py:190
Function
parse_string
Parse a string into a dictionary using the current config type parser. Args: s: The string to parse Returns: A dictiona
draccus/cfgparsing.py:15
Method
parse_string
(s)
draccus/parsers/config_parsers.py:34
Method
parse_string
(s)
draccus/parsers/config_parsers.py:62
Method
parse_string
(s)
draccus/parsers/config_parsers.py:88
Method
print_help
(self, file=None)
draccus/argparsing.py:148
Function
raises_expected_n_args
(n: int)
tests/testutils.py:58
Function
raises_missing_required_arg
()
tests/testutils.py:52
Function
raises_unrecognized_args
(*args: str)
tests/testutils.py:64
Function
register
(cls, func=None, include_subclasses=False)
draccus/parsers/registry_utils.py:54
Method
register_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/dataclass_wrapper.py:70
Method
register_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/choice_wrapper.py:63
Function
remove_matching
(dict_a, dict_b)
draccus/utils.py:351
Method
required
(self)
draccus/wrappers/wrapper.py:61
Method
required
(self)
draccus/wrappers/dataclass_wrapper.py:149
Method
required
(self)
draccus/wrappers/field_wrapper.py:232
Method
required
(self)
draccus/wrappers/choice_wrapper.py:114
Method
required
(self)
draccus/wrappers/choice_wrapper.py:165
Method
save_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:54
Method
save_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:77
Method
save_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:103
Function
should_equal
(expected: str, file_path: Optional[str] = None)
tests/conftest.py:51
Function
silent
Test fixture that will make a tests fail if it prints anything to stdout or logs warnings
tests/conftest.py:84
Function
simple_attribute
Test fixture that produces an tuple of (type, passed value, expected value)
tests/conftest.py:39
Function
test_arg_value_is_set_when_args_are_provided
(some_type: Type, default_value: Any, arg_value: Any)
tests/test_base.py:64
Function
test_argparse_with_custom_parsing
()
tests/test_base.py:197
Function
test_basic_optional_argument
(simple_attribute, silent)
tests/test_base.py:43
Function
test_basic_required_argument
(simple_attribute, silent)
tests/test_base.py:20
Function
test_bool_attributes_work
()
tests/test_bools.py:24
Function
test_bool_doesnt_parse_non_bools
()
tests/test_bools.py:36
Function
test_calling_using_dataclasses
()
tests/test_calling_using_dataclass.py:19
Function
test_choice_registry_argparse
()
tests/test_argparse_choice_types.py:34
Function
test_choice_registry_decode
()
tests/test_choice_types.py:33
Function
test_choice_registry_encode
()
tests/test_choice_types.py:54
Function
test_choice_registry_examine_help
(snapshot)
tests/test_argparse_choice_types.py:60
Function
test_choice_registry_examine_help
(snapshot)
tests/test_argparse_choice_types_plugin.py:50
Function
test_collection_no_type
(item_type, type_hint, value, arg)
tests/test_lists.py:112
Function
test_decode_union_with_dataclass_and_atomic
()
tests/test_union.py:109
Function
test_deeply_nested_optional_parameter_groups
Same as above tests, but deeper hierarchy.
tests/test_optional.py:72
Function
test_default_dataclass_argument
(simple_attribute, silent)
tests/test_default_args.py:27
Function
test_default_help_inline
(snapshot)
tests/test_preferred_help.py:48
Function
test_default_value
(ContainerClass)
tests/test_lists.py:70
Function
test_dict_field
()
tests/test_utils.py:111
Function
test_dict_field_with_keyword_args
()
tests/test_utils.py:125
Function
test_dict_field_without_args
()
tests/test_utils.py:138
Function
test_docstring_parsing_work_on_base
()
tests/test_docstrings.py:45
Function
test_docstring_parsing_works_on_extended
()
tests/test_docstrings.py:62
Function
test_docstring_works_with_field_function
()
tests/test_docstrings.py:89
Function
test_dump_future_annotation_string_field
()
tests/test_future_annotations.py:41
Function
test_dump_load
(simple_attribute, config_type, tmp_path)
tests/test_decoding.py:41
Function
test_dump_load_context
()
tests/test_decoding.py:69
Function
test_dump_load_dicts
(simple_attribute, tmp_path)
tests/test_decoding.py:89
Function
test_dump_load_enum
(tmp_path)
tests/test_decoding.py:113
Function
test_each_type_is_used_correctly
()
tests/test_tuples.py:42
Function
test_empty_required_str
()
tests/test_base.py:208
Function
test_encode_basic_types
()
tests/test_encoding.py:22
Function
test_encode_choice_type
()
tests/test_encoding.py:140
Function
test_encode_choice_type_in_generic
()
tests/test_encoding.py:155
Function
test_encode_complex_nesting
()
tests/test_encoding.py:104
Function
test_encode_dataclass
()
tests/test_encoding.py:57
Function
test_encode_dataclass_type_parameters_error
()
tests/test_encoding.py:229
Function
test_encode_dict
()
tests/test_encoding.py:50
Function
test_encode_enum
()
tests/test_encoding.py:31
Function
test_encode_enum_str
()
tests/test_encoding.py:217
Function
test_encode_generic_dataclass
()
tests/test_encoding.py:89
Function
test_encode_generic_union_member
()
tests/test_encoding.py:177
Function
test_encode_list
()
tests/test_encoding.py:36
Function
test_encode_literal_union_member
()
tests/test_encoding.py:189
← previous
next →
201–300 of 407, ranked by callers