Questions tagged [flask-restless]

Flask-Restless provides simple generation of ReSTful APIs for database models defined using SQLAlchemy (or Flask-SQLAlchemy)

Flask-Restless provides simple generation of ReSTful APIs for database models defined using SQLAlchemy (or Flask-SQLAlchemy). The generated APIs send and receive messages in JSON format.

116 questions
0
votes
1 answer

Custom arguments in Flask-Restless?

Flask-Restless only accepts arguments that are columns defined in a SQLAlchemy model. I want to take something like blue green and store it in two columns primary_color and secondary_color. Right now, I am POSTing the data as primary_color (an…
Patrick Yan
  • 2,338
  • 5
  • 25
  • 33
0
votes
1 answer

How to use query operator "like" supported by Flask-Restless

I have the following class relationships and I have been wondering how to use "Like" operator. class A(db.Model): b = db.relationship("B") class B(db.Model): info = db.Column(db.String(20)) When I contract a query as: q={"filters":…
chfw
  • 4,502
  • 2
  • 29
  • 32
0
votes
2 answers

How to "select distinct" with flask-restless

I'm new to flask-restless, and looking for a way to do a "SELECT DISTINCT" on a table. I've been reading the docs and found "Function evaluation". But I couldn't find how to put a function evaluation into a preprocessor or am I absolutely…
joergwork
  • 301
  • 3
  • 6
0
votes
1 answer

Unable to import Flask-Restless

So I'm trying to use Flask-Restless. Unfortunately I cannot import flask.ext.restless. >>> from flask.ext.restless import APIManager Traceback (most recent call last): File "", line 1, in File "",…
mrkaiser
  • 149
  • 7
0
votes
2 answers

Preprocess function Flask Restless

I'm trying to combine Ember.js and Flask Restless, but am running into difficulties interfacing the JSON API. The problem is that I need to massage the JSON to match what Ember is expecting client side. Ember is sending something like this on…
dvreed77
  • 2,217
  • 2
  • 27
  • 42
0
votes
1 answer

404 Errors with flask-restless and Amazon Elastic Beanstalk

So I have a Python Flask application. With it I'm using flask-restless and flask-sqlalchemy to provide an api. When running on my localhost the api works just fine, however when trying to access the api on the Amazon server(an ec2 instance created…
-1
votes
1 answer

Using axios to GET data from flask-restless API

I'm trying to use axios to get data from an flask-restless API. The following Python request works no problem: import requests import json url = 'http://127.0.0.1:5001/api/cds' headers = {'Content-Type': 'application/json'} filters =…
nven
  • 1,047
  • 4
  • 13
  • 22
-1
votes
1 answer

how to post the data through api in android and show the data in python web interface

I'm new to python-flask. i created the end points by using restless api ,my question is ,while posting the data through android app the data will not be inserted to the API. here what is the problem .
-1
votes
1 answer

Flask Restless post with many to many relationship

I am using flask restless and try to do a post to create a new record for many to many relationship Categories = db.Table('categories', db.Column( 'help_request_id', db.Integer,…
Alex Chan
  • 297
  • 4
  • 14
-2
votes
1 answer

How do I build a complex filter for Flask-Restless when using Requests?

I want to make a complex query to a Flask-Restless api using Requests. I am not sure how to build the following query from the examples with Requests. How do I make this query? GET /api/person?q={"filters":[{"name":"age","op":"ge","val":10}]}…
-5
votes
1 answer

Filter for Flask-Restless doesn't filter results

I am trying to use requests to send a filter query to Flask-Restless. The results are not filtered. How do I correctly write a filter? import requests import json q = {'filters': [{'task': 'build an API', 'task': 'profit'}]} r =…
1 2 3 4 5 6 7
8