Questions tagged as 'flask'

1
answer

python request iugu returns status 400

I'm testing the iugu.com api to generate ticket payments and I'm having problems with json's return because there is no error in dictionary items which is sent to the API (in php would be an array) The code is as follows: from flask impor...
asked by 11.09.2015 / 18:48
1
answer

Flask relationship of sqlalchemy tables

Hey, everyone! I come asking for a force, I'm having a problem to accomplish the construction of the object to create the relationship of the tables. I have a table driver and another passenger and another still called race. In the race table I...
asked by 21.09.2017 / 19:01
0
answers

Slugfy in query FLASK

I'm trying to slug a dice, I tried to use the lower and replace to change some characters, my query looks like this: return Person.query.get(person_id).name.filter(func.lower(func.replace(Person.name, "ç", "c")) It works, but if I get some...
asked by 29.06.2017 / 00:33
0
answers

How to get only one Json value using request.get_data () Flask Python

I'm a beginner in Python and would like a tip to get only one value from the following Json. { "test1":"valortest1", "test2":"valortest2", "test3":"valortest3", "test1":"valortest1" } Use to get json as follows in flask. given = req...
asked by 16.06.2017 / 22:42
0
answers

Test API Python

How can I test a url of an api using nosetest For example: I have the following api: /api/user How to ensure that calls in this url are being called? make a GET ... a POST passing the parameters in the body I tri...
asked by 20.03.2017 / 19:35
1
answer

How to return multiple values in a function in python?

I'm developing an API in Python FLASK and I need to show the result of a SELECT I made via SQL ALCHEMY . But when I use return it only returns the first ROW of SELECT . The funny thing is that with "print" it...
asked by 17.11.2016 / 17:39
2
answers

How to insert checkbox dynamically from Python / Flask code?

I'm trying to create a script in Flask and I came across the following situation: I have in my code a for which scans the subdirectories of a root directory: for root, dirs, files in os.walk(destination): for name in dirs: ......
asked by 16.05.2016 / 15:06
0
answers

How to put a progress bar for a process in Flask?

Hello, When you click the 'Submit' button, the selected file (.jpg) is copied to several directories. I want to show this process to the user through a simple progress bar. Any tips? This is part of my script to copy the selected file to o...
asked by 11.05.2016 / 20:03
1
answer

Permission denied - Logging

I have implemented Logging of python into several Flask projects successfully. But when I tried to re-implement Logging in a project it gives the following error:IOError: [Errno 13] Permission denied . To try to solve the problem...
asked by 20.10.2015 / 18:46
2
answers

Allow a list as argument

I have a REST API in Python that gets 2 arguments, a Url list and a word. I am a beginner in Python and would like to know if it is possible to split the URl string to accept more than one URL when requesting the body from the URL. For example,...
asked by 01.10.2018 / 15:21