MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / validate_options

Function validate_options

pymongo/uri_parser_shared.py:367–379  ·  view source on GitHub ↗

Validates and normalizes options passed in a MongoDB URI. Returns a new dictionary of validated and normalized options. If warn is False then errors will be thrown for invalid options, otherwise they will be ignored and a warning will be issued. :param opts: A dict of MongoDB URI o

(opts: Mapping[str, Any], warn: bool = False)

Source from the content-addressed store, hash-verified

365
366
367def validate_options(opts: Mapping[str, Any], warn: bool = False) -> MutableMapping[str, Any]:
368 """Validates and normalizes options passed in a MongoDB URI.
369
370 Returns a new dictionary of validated and normalized options. If warn is
371 False then errors will be thrown for invalid options, otherwise they will
372 be ignored and a warning will be issued.
373
374 :param opts: A dict of MongoDB URI options.
375 :param warn: If ``True`` then warnings will be logged and
376 invalid options will be ignored. Otherwise invalid options will
377 cause errors.
378 """
379 return get_validated_options(opts, warn)
380
381
382def split_options(

Callers 2

split_optionsFunction · 0.85
_parse_kms_tls_optionsFunction · 0.85

Calls 1

get_validated_optionsFunction · 0.90

Tested by

no test coverage detected