Test your knowledge

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

  1. Which HTTP verb is meant to replace an entire resource:
    1.  PATCH
    2. POST
    3. PUT
  1. Which HTTP verb is meant to apply a delta to an existing resource:
    1. PATCH
    2. POST
    3. PUT
  1. By default, the passlib library will use the SHA-512 scheme for 64-bit platforms with the minimum number of rounds set to:
    1. 135,000
    2. 335,000
    3. 535,000
  1. The flask.g object is:
    1. A proxy that provides access to the current request
    2. An instance of the flask_httpauth.HTTPBasicAuth class
    3. A proxy that allows us to store on this whatever we want to share for one request only
  1. The passlib package provides:
    1. A password hashing framework that supports more than 30 schemes
    2. An authentication framework that automatically adds models for users and permissions to a Flask application
    3. A lightweight web framework that replaces Flask
  1. The auth.verify_password decorator applied to a function:
    1. Makes this function become the callback that Flask-HTTPAuth will use to hash the password for a specific user
    2. Makes this function become the callback that SQLAlchmey will use to verify the password for a specific user
    3. Makes this function become the callback that Flask-HTTPAuth will use to verify the password for a specific user

  1. When you assign a list that includes auth.login_required to the method_decorators property of any subclass of flask_restful.Resource, considering that auth is an instance of the flask_httpauth.HTTPBasicAuth():
    1. All the methods declared in the resource will have the auth.login_required decorator applied to them
    2. The post method declared in the resource will have auth.login_required decorator applied to it
    3. Any of the following methods declared in the resource will have auth.login_required decorator applied to them: delete, patch, post, and put
  1. Which of the following lines retrieve the integer value for the 'page' argument from the request object, considering that the code would be running within a method defined in a subclass of flask_restful.Resource class?:
    1. page_number = request.get_argument('page', 1, type=int)
    2. page_number = request.args.get('page', 1, type=int)
    3. page_number = request.arguments.get('page', 1, type=int)

 

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

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