flask-restful

Flask SQLAlchemy select child object - return JSONB column

Flask SQLAlchemy select child object - return JSONB column
I have a class with a one-many relationship. I would like to return all the parent's children in the relationship ; specifically I'd like to return all the JSONB objects in my children tables.These are my class:class Parent(db.Model): __tablename__ =

flask restful: passing parameters to GET request

flask restful: passing parameters to GET request
I want to create a resource that supports GET request in following way:/bar?key1=val1&key2=val2I tried this code, but it is not workingapp = Flask(__name__) api = Api(app) class BarAPI(Resource): def get(key1, key2): return jsonify(dict(data=[key1, k

Python nose test failing on JSON response

Python nose test failing on JSON response
This is the method in ReportRunner class in report_runner.py in my Flask-Restful app:class ReportRunner(object): def __init__(self): pass def setup_routes(self, app): app.add_url_rule("/run_report", view_func=self.run_report) def request_report(

Flask-Restful basic setup

Flask-Restful basic setup
When I try to go to/apiI get to convert my database to an api.from flask import Flask , render_template from flask_restful import Resource, Api,marshal_with, fields from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config.from_object(
What Others Are Reading