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

Function _parse_codec_options

bson/codec_options.py:489–505  ·  view source on GitHub ↗

Parse BSON codec options.

(options: Any)

Source from the content-addressed store, hash-verified

487
488
489def _parse_codec_options(options: Any) -> CodecOptions[Any]:
490 """Parse BSON codec options."""
491 kwargs = {}
492 for k in set(options) & {
493 "document_class",
494 "tz_aware",
495 "uuidrepresentation",
496 "unicode_decode_error_handler",
497 "tzinfo",
498 "type_registry",
499 "datetime_conversion",
500 }:
501 if k == "uuidrepresentation":
502 kwargs["uuid_representation"] = options[k]
503 else:
504 kwargs[k] = options[k]
505 return CodecOptions(**kwargs)

Callers 1

__init__Method · 0.90

Calls 1

CodecOptionsClass · 0.85

Tested by

no test coverage detected