Test your knowledge

Let's see whether you can answer the following questions correctly:

  1. Which of the following commands start the Flask development server and the Flask application, and makes it listen on every interface on port 5000?:
    1. flask run -h 0.0.0.0
    2. flask run -p 0.0.0.0 -h 5000
    3. flask run -p 0.0.0.0
  1. Flask-Migrate is:
    1. A lightweight library for converting complex datatypes to and from native Python datatypes.
    2. A library that uses the Alembic package to handle SQLAlchemy database migrations for Flask applications.
    3. A library that replaces SQLAlchemy to run queries on PostgreSQL.
  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.
  1. 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.
  1. The marshmallow.pre_load decorator:
    1. Registers a method to run after any instance of the Resource class is created.
    2. Registers a method to invoke after serializing an object.
    3. Registers a method to invoke before deserializing an object.
  1. 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.
  1. 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
3.138.118.250