Functions | |
| def | _auth_key |
| def | _check_command_response |
| def | _fields_list_to_dict |
| def | _index_document |
| def | _index_list |
| def | _password_digest |
| def | _unpack_response |
Variables | |
| _md5func = hashlib.md5 | |
| def pymongo::helpers::_auth_key | ( | nonce, | ||
| username, | ||||
| password | ||||
| ) | [private] |
Get an auth key to use for authentication.
Definition at line 143 of file helpers.py.
| def pymongo::helpers::_check_command_response | ( | response, | ||
| reset, | ||||
msg = "%s", |
||||
allowable_errors = [] | ||||
| ) | [private] |
Definition at line 111 of file helpers.py.
| def pymongo::helpers::_fields_list_to_dict | ( | fields | ) | [private] |
Takes a list of field names and returns a matching dictionary.
["a", "b"] becomes {"a": 1, "b": 1}
and
["a.b.c", "d", "a.c"] becomes {"a.b.c": 1, "d": 1, "a.c": 1}
Definition at line 152 of file helpers.py.
| def pymongo::helpers::_index_document | ( | index_list | ) | [private] |
Helper to generate an index specifying document. Takes a list of (key, direction) pairs.
Definition at line 49 of file helpers.py.
| def pymongo::helpers::_index_list | ( | key_or_list, | ||
direction = None | ||||
| ) | [private] |
Helper to generate a list of (key, direction) pairs. Takes such a list, or a single key, or a single key and direction.
Definition at line 33 of file helpers.py.
| def pymongo::helpers::_password_digest | ( | username, | ||
| password | ||||
| ) | [private] |
Get a password digest to use for authentication.
Definition at line 129 of file helpers.py.
| def pymongo::helpers::_unpack_response | ( | response, | ||
cursor_id = None, |
||||
as_class = dict, |
||||
tz_aware = False | ||||
| ) | [private] |
Unpack a response from the database.
Check the response for errors and unpack, returning a dictionary
containing the response data.
:Parameters:
- `response`: byte string as returned from the database
- `cursor_id` (optional): cursor_id we sent to get this response -
used for raising an informative exception when we get cursor id not
valid at server response
- `as_class` (optional): class to use for resulting documents
Definition at line 75 of file helpers.py.
| pymongo::helpers::_md5func = hashlib.md5 |
Definition at line 19 of file helpers.py.