marshmallow_configparser¶
-
class
Boolean
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Boolean
-
class
Date
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Date
-
class
DateTime
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.DateTime
-
class
Decimal
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Decimal
-
class
Dict
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Dict
-
class
Email
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Email
-
class
Float
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Float
-
class
FormattedString
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.FormattedString
-
class
Function
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Function
-
class
Integer
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Integer
-
class
List
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.List
-
class
LocalDateTime
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.LocalDateTime
-
class
Method
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Method
-
class
Number
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Number
-
class
String
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.String
-
class
Time
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Time
-
class
TimeDelta
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.TimeDelta
-
class
UUID
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.UUID
-
class
Url
(section, *args, **kwargs)[source]¶ Bases:
marshmallow_configparser.fields.ConfigParserFieldMixin
,marshmallow.fields.Url
-
class
ConfigParserSchema
(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]¶ Bases:
marshmallow.schema.Schema
-
dump
(obj)[source]¶ Dump object to list of strings representing INI file.
In marshmallow 2.x.x returns tuple of
data, errors
or raises depending onself.strict
In marshmallow 3.x.x always returns
data
or raises (schema is always strict in marshmallow 3.x.x)
-
dumps
(obj)[source]¶ Dump object to string representing INI file.
In marshmallow 2.x.x returns tuple of
data, errors
or raises depending onself.strict
In marshmallow 3.x.x always returns
data
or raises (schema is always strict in marshmallow 3.x.x)
-
load
(config_files)[source]¶ Load configuration from list of config file paths.
In marshmallow 2.x.x returns tuple of
data, errors
or raises depending onself.strict
In marshmallow 3.x.x always returns
data
or raises (schema is always strict in marshmallow 3.x.x)
-
loads
(ini_file_data)[source]¶ Load configuration from string representing INI file.
In marshmallow 2.x.x returns tuple of
data, errors
or raises depending onself.strict
In marshmallow 3.x.x always returns
data
or raises (schema is always strict in marshmallow 3.x.x)
-
opts
= <marshmallow_configparser.schema.ModelOpts object>¶
-
-
class
IsNotBlank
[source]¶ Bases:
marshmallow.validate.Validator
Validator which succeeds if the value passed is not blank string.
-
error
= None¶
-
-
class
IsNotNone
[source]¶ Bases:
marshmallow.validate.Validator
Validator which succeeds if the value passed is not blank string.
-
error
= None¶
-
-
class
ConfigBoolean
(section, default=None, attribute=None, load_from=None, dump_to=None, error=None, error_messages=None, **metadata)[source]¶ Bases:
marshmallow_configparser.fields.Boolean
marshmallow.fields.Field
that ensures:- option is always present in deserialized data
This is pretty similar to
Boolean
, except this one assumes defaults for some ofInteger
attributes.
-
class
ConfigInteger
(section, default=None, attribute=None, load_from=None, dump_to=None, error=None, error_messages=None, as_string=False, validate=None, **metadata)[source]¶ Bases:
marshmallow_configparser.fields.Integer
marshmallow.fields.Field
that ensures:- option is always present in deserialized data
- deserialized value is either the one read from config file or one
declared in
default
- allows None as deserialized value (
Integer
raises ValidationError(‘Not a valid integer.’))
This is pretty similar to
Integer
, except this one assumes defaults for some ofInteger
attributes and changes treating of None values.
-
class
ConfigString
(section, default='', attribute=None, load_from=None, dump_to=None, error=None, load_only=False, dump_only=False, error_messages=None, validate=None, **metadata)[source]¶ Bases:
marshmallow_configparser.fields.String
marshmallow.fields.Field
that ensures:- option is always present in deserialized data
- deserialized value is either the one read from config file or one
declared in
default
This is pretty similar to
String
, except this one assumes defaults for some ofString
attributes.