Test your knowledge

  1. Marshmallow is:
    1. A lightweight library for converting complex datatypes to and from native Python datatypes.
    2. An ORM .
    3. A lightweight web framework that replaces Flask.

  2. SQLAlchemy is:
    1. A lightweight library for converting complex datatypes to and from native Python datatypes.
    2. An ORM .
    3. A lightweight web framework that replaces Flask.

  3. The marshmallow.pre_load decorator:
    1. Registers a method to run after any instance of the MessageSchema class is created.
    2. Registers a method to invoke after serializing an object.
    3. Registers a method to invoke before deserializing an object.

  4. The dump method for any instance of a Schema subclass:
    1. Routes URLs to Python primitives.
    2. Persists the instance or collection of instances passed as an argument to the database.
    3. Takes the instance or collection of instances passed as an argument and applies the field filtering and output formatting specified in the Schema subclass to the instance or collection of instances.

  5. When we declare an attribute as an instance of the marshmallow.fields.Nested class:
    1. The field will nest a single Schema or a collection of Schema based on the value for the many argument.
    2. The field will nest a single Schema. If we want to nest a collection of Schema, we have to use an instance of the marshmallow.fields.NestedCollection class.
    3. The field will nest a collection of Schema. If we want to nest a single Schema, we have to use an instance of the marshmallow.fields.NestedSingle class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.170.134