Sort the code in the right way to get a working program:
Marshalling data
API Constructor
Report a typo
Put the items in the correct order
class ArgResourceDao(object):
def __init__(self, name, value):
self.name = name
self.value = value
def __init__(self, name, value):
self.name = name
self.value = value
arg_fields = {'name': fields.String, 'value': fields.String}
class ArgResource(Resource):
@marshal_with(arg_fields)
def __init__(self, **kwargs):
return ArgResourceDao(**kwargs)
@marshal_with(arg_fields)
def __init__(self, **kwargs):
return ArgResourceDao(**kwargs)
app = Flask('main')
api = Api(app)
api = Api(app)
from flask import Flask
from flask_restful import fields, marshal_with, Api, Resource
from flask_restful import fields, marshal_with, Api, Resource
app.run()
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.