BSON backend.
New in version 0.1.0.
Decide loading options by bson._use_c.
| Parameters: | use_c – bson._use_c |
|---|
>>> _load_opts(True)
[]
>>> _load_opts(False)
['as_class', 'tz_aware', 'uuid_subtype']
# >>> _load_opts() # <result varies depends on environment...>
Bases: anyconfig.backend.base.FromStringLoader, anyconfig.backend.base.ToStringDumper
Loader/Dumper of BSON files.
Encode a document to a new BSON instance.
A document can be any mapping type (like dict).
Raises TypeError if document is not a mapping type, or contains keys that are not instances of basestring (str in python 3). Raises InvalidDocument if document cannot be converted to BSON.
| Parameters: |
|
|---|
New in version 1.9.
Load BSON config from given string content.
| Parameters: |
|
|---|---|
| Returns: | self.container() object holding config parameters |