Flask is a micro-framework for Python based on Werkzeug, Jinja 2 and good intentions.

learn more… | top users | synonyms

1
vote
1answer
44 views

Add user to a database and perform relevant checks

Below is a function that adds a new user to the database using their email and password. I am using Flask and SQLAlchemy. ...
2
votes
1answer
44 views
3
votes
1answer
98 views

Flask form validation technique

This is currently the code that I'm using to validate and check for errors in a flask app, where the form fields are coming from a /registration html page: ...
3
votes
3answers
71 views

Flask route to pull data from database for getJSON to process

I am developing a reporting application in Flask where I pull data in a route function from a postgresql database and jsonify the data. On the client side I have ...
2
votes
0answers
482 views

Is this implementation for token based authentication in flask-peewee secure and efficient?

I'm making an app with a Flask API backend using a Flask-Peewee ORM and an AngularJS frontend. The Flask-Peewee ORM doesn't support token based authentication, so I decided to try to implement this ...
1
vote
1answer
362 views

Utilization of Steam APIs and web-scraping

Some background info here: This is a small fun project I made utilizing Steam APIs and web-scraping This is the first time I've ever used Python, so I'm not very familiar with the language I used ...
2
votes
0answers
103 views

Structure of database model for a Flask project

I'm working on a project with Flask and I'm trying to follow Miguel Grinberg's Flask tutorial as closely as possible while creating what I need for my own project. Overall, how does it look? Miguel's ...
2
votes
1answer
120 views

Simple web application for benchmark

There is an article where the author tries to compare performance of different web stacks. The result looks pretty controversial. I try to prove that in real use case the difference between scores of ...
3
votes
1answer
148 views

How to better indent multiline strings with many string formatting args?

I have a function, that is used in flask, for logging application errors: ...
4
votes
0answers
301 views

Multi-dictionary API using Python Flask-RESTful

I'm working on a simple online dictionary tool, using Python Flask-RESTful as the RESTful API backend. The dictionary tool is modular, it can handle multiple dictionaries, implemented as independent ...
3
votes
1answer
73 views

Catching API changes for a service that doesn't version its API

I'm using the old Google Data API to access several spreadsheets and put their contents in a database using Flask and SQLAlchemy. Each run deletes the contents of the database tables and repopulates ...
7
votes
1answer
217 views

Subclassing Flask for Permissions with Google App Engine

I'm trying to set up a very lightweight permission system using Google App Engine and Flask. The end result I am hoping for is that each individual view is its own permission, and in an admin panel ...
4
votes
1answer
182 views

Caching a function view for a day

I am writing a flask app that I will deploy it on Heroku to test it. There is a page that will generate daily photos and information based on a JSON file. The view is valid for 24 hours beginning from ...
1
vote
0answers
224 views

First flask app critique

I just started with Python a month ago, and with Flask this week. This is my first project. I am curious about general style, proper use of Python idioms, and Flask best-practices. ...
1
vote
1answer
190 views

Python flask web app, simplification

I am writing web application using flask framework + mongodb. I have an issue, should I use classes for my mongo entities or just use dictionaries for them. ...
1
vote
2answers
180 views

Simple Python Flash app using Wikidot API to transfer pages between two wikis

Here's a simple Python Flask app. It uses the Wikidot API to transfer pages between two wikis. I'd like to hear your input on the best way to refactor this code. Here are a couple of questions I ...
2
votes
2answers
494 views

Database calls with Python Flask and SQLAlchemy

I am creating a Python Flask webservice and this is basically how I am doing all of my database calls if a webservice needs to interact with the database: ...
10
votes
1answer
2k views

Flask-SQLAlchemy models and unit-testing

This is my first time building anything remotely like a robust database. I'm midway through designing it and I would be grateful if you have suggestions or have found any logical errors. Goal: allow ...
3
votes
1answer
425 views

Authentication for a Flask API

I've written a couple of functions to check if a consumer of the API should be authenticated to use it or not. Have I done anything blatantly wrong here? Config ...
4
votes
1answer
594 views

Website menu with Flask

I wrote some code in Flask for site menu: ...
2
votes
0answers
282 views

Contest assist web app

This is a small web application that I have created using the Flask framework. I am looking for best practices feedback, as well as design pointers. I am not confident that my design choices have ...
2
votes
1answer
376 views

Python RESTful image handler

This is a view as part of a RESTful image handler module, written for Flask, I am sure there is a better/more pythonic way of doing parts of this, maybe using List Comprehensions or Generator ...
3
votes
2answers
1k views

Security of simple client/server desktop app

I am writing an application aimed at the desktop but using web technologies. It will have an HTML interface and a server written in Python using Flask will do all of the filesystem interaction. It ...