|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
| class | _CaseInsensitiveDictionary |
| class | BaseObject |
| def pymongo.common.clean_node | ( | node | ) |
Split and normalize a node name from an ismaster response.
| def pymongo.common.get_validated_options | ( | options, | |
warn = True |
|||
| ) |
Validate each entry in options and raise a warning if it is not valid.
Returns a copy of options with invalid entries removed.
:Parameters:
- `opts`: A dict containing MongoDB URI options.
- `warn` (optional): If ``True`` then warnings will be logged and
invalid options will be ignored. Otherwise, invalid options will
cause errors.
| def pymongo.common.partition_node | ( | node | ) |
Split a host:port string into (host, int(port)) pair.
| def pymongo.common.raise_config_error | ( | key, | |
| dummy | |||
| ) |
Raise ConfigurationError with the given key name.
| def pymongo.common.validate | ( | option, | |
| value | |||
| ) |
Generic validation function.
| def pymongo.common.validate_appname_or_none | ( | option, | |
| value | |||
| ) |
Validate the appname option.
| def pymongo.common.validate_auth_mechanism | ( | option, | |
| value | |||
| ) |
Validate the authMechanism URI option.
| def pymongo.common.validate_auth_mechanism_properties | ( | option, | |
| value | |||
| ) |
Validate authMechanismProperties.
| def pymongo.common.validate_auth_option | ( | option, | |
| value | |||
| ) |
Validate optional authentication parameters.
| def pymongo.common.validate_boolean | ( | option, | |
| value | |||
| ) |
Validates that 'value' is True or False.
| def pymongo.common.validate_boolean_or_string | ( | option, | |
| value | |||
| ) |
Validates that value is True, False, 'true', or 'false'.
| def pymongo.common.validate_document_class | ( | option, | |
| value | |||
| ) |
Validate the document_class option.
| def pymongo.common.validate_driver_or_none | ( | option, | |
| value | |||
| ) |
Validate the driver keyword arg.
| def pymongo.common.validate_int_or_basestring | ( | option, | |
| value | |||
| ) |
Validates that 'value' is an integer or string.
| def pymongo.common.validate_integer | ( | option, | |
| value | |||
| ) |
Validates that 'value' is an integer (or basestring representation).
| def pymongo.common.validate_is_callable_or_none | ( | option, | |
| value | |||
| ) |
Validates that 'value' is a callable.
| def pymongo.common.validate_is_document_type | ( | option, | |
| value | |||
| ) |
Validate the type of method arguments that expect a MongoDB document.
| def pymongo.common.validate_is_mapping | ( | option, | |
| value | |||
| ) |
Validate the type of method arguments that expect a document.
| def pymongo.common.validate_list | ( | option, | |
| value | |||
| ) |
Validates that 'value' is a list.
| def pymongo.common.validate_list_or_mapping | ( | option, | |
| value | |||
| ) |
Validates that 'value' is a list or a document.
| def pymongo.common.validate_list_or_none | ( | option, | |
| value | |||
| ) |
Validates that 'value' is a list or None.
| def pymongo.common.validate_max_staleness | ( | option, | |
| value | |||
| ) |
Validates maxStalenessSeconds according to the Max Staleness Spec.
| def pymongo.common.validate_non_negative_int_or_basestring | ( | option, | |
| value | |||
| ) |
Validates that 'value' is an integer or string.
| def pymongo.common.validate_non_negative_integer | ( | option, | |
| value | |||
| ) |
Validate that 'value' is a positive integer or 0.
| def pymongo.common.validate_non_negative_integer_or_none | ( | option, | |
| value | |||
| ) |
Validate that 'value' is a positive integer or 0 or None.
| def pymongo.common.validate_ok_for_replace | ( | replacement | ) |
Validate a replacement document.
| def pymongo.common.validate_ok_for_update | ( | update | ) |
Validate an update document.
| def pymongo.common.validate_positive_float | ( | option, | |
| value | |||
| ) |
Validates that 'value' is a float, or can be converted to one, and is positive.
| def pymongo.common.validate_positive_float_or_zero | ( | option, | |
| value | |||
| ) |
Validates that 'value' is 0 or a positive float, or can be converted to 0 or a positive float.
| def pymongo.common.validate_positive_integer | ( | option, | |
| value | |||
| ) |
Validate that 'value' is a positive integer, which does not include 0.
| def pymongo.common.validate_positive_integer_or_none | ( | option, | |
| value | |||
| ) |
Validate that 'value' is a positive integer or None.
| def pymongo.common.validate_read_preference | ( | dummy, | |
| value | |||
| ) |
Validate a read preference.
| def pymongo.common.validate_read_preference_mode | ( | dummy, | |
| value | |||
| ) |
Validate read preference mode for a MongoReplicaSetClient. .. versionchanged:: 3.5 Returns the original ``value`` instead of the validated read preference mode.
| def pymongo.common.validate_read_preference_tags | ( | name, | |
| value | |||
| ) |
Parse readPreferenceTags if passed as a client kwarg.
| def pymongo.common.validate_readable | ( | option, | |
| value | |||
| ) |
Validates that 'value' is file-like and readable.
| def pymongo.common.validate_string | ( | option, | |
| value | |||
| ) |
Validates that 'value' is an instance of `basestring` for Python 2 or `str` for Python 3.
| def pymongo.common.validate_string_or_none | ( | option, | |
| value | |||
| ) |
Validates that 'value' is an instance of `basestring` or `None`.
| def pymongo.common.validate_timeout_or_none | ( | option, | |
| value | |||
| ) |
Validates a timeout specified in milliseconds returning a value in floating point seconds.
| def pymongo.common.validate_timeout_or_none_or_zero | ( | option, | |
| value | |||
| ) |
Validates a timeout specified in milliseconds returning a value in floating point seconds. value=0 and value="0" are treated the same as value=None which means unlimited timeout.
| def pymongo.common.validate_timeout_or_zero | ( | option, | |
| value | |||
| ) |
Validates a timeout specified in milliseconds returning a value in floating point seconds for the case where None is an error and 0 is valid. Setting the timeout to nothing in the URI string is a config error.
| def pymongo.common.validate_type_registry | ( | option, | |
| value | |||
| ) |
Validate the type_registry option.
| def pymongo.common.validate_tzinfo | ( | dummy, | |
| value | |||
| ) |
Validate the tzinfo option
| def pymongo.common.validate_unicode_decode_error_handler | ( | dummy, | |
| value | |||
| ) |
Validate the Unicode decode error handler option of CodecOptions.
| def pymongo.common.validate_uuid_representation | ( | dummy, | |
| value | |||
| ) |
Validate the uuid representation option selected in the URI.
| COMMAND_NOT_FOUND_CODES |
| CONNECT_TIMEOUT |
| EVENTS_QUEUE_FREQUENCY |
| HEARTBEAT_FREQUENCY |
| INTERNAL_URI_OPTION_NAME_MAP |
| KILL_CURSOR_FREQUENCY |
| KW_VALIDATORS |
| LOCAL_THRESHOLD_MS |
| MAX_BSON_SIZE |
| MAX_IDLE_TIME_MS |
| MAX_IDLE_TIME_SEC |
| MAX_MESSAGE_SIZE |
| MAX_POOL_SIZE |
| MAX_SUPPORTED_WIRE_VERSION |
| MAX_WIRE_VERSION |
| MAX_WRITE_BATCH_SIZE |
| MIN_HEARTBEAT_INTERVAL |
| MIN_POOL_SIZE |
| MIN_SRV_RESCAN_INTERVAL |
| MIN_SUPPORTED_SERVER_VERSION |
| MIN_SUPPORTED_WIRE_VERSION |
| MIN_WIRE_VERSION |
| NONSPEC_OPTIONS_VALIDATOR_MAP |
| ORDERED_TYPES |
| RETRY_READS |
| RETRY_WRITES |
| SERVER_SELECTION_TIMEOUT |
| TIMEOUT_OPTIONS |
| UNAUTHORIZED_CODES |
| URI_OPTIONS_ALIAS_MAP |
| URI_OPTIONS_DEPRECATION_MAP |
| URI_OPTIONS_VALIDATOR_MAP |
| VALIDATORS |
| WAIT_QUEUE_TIMEOUT |
| WRITE_CONCERN_OPTIONS |