Questions tagged [flask]

Flask is a web application framework for Python.

Filter by
Sorted by
Tagged with
-2
votes
0answers
40 views

What is the best way to run an infinite loop in flask?

I am wondering what the most simple way of running a continuous while loop in flask is. I have a flask webserver and I have a route that is used for the user to send POST to set a range to keep some ...
0
votes
0answers
31 views

How to store articles (with text and images) in SQLAlchemy database

I'm working on a blog-like application with Flask and SQLAlchemy and I'm unsure how to store the blog posts (articles) in the database. These are going to contain text and images (placed between ...
-3
votes
0answers
26 views

Working with Database connections in CRUD flask application

I am creating a CRUD application with flask. In this application about 40 people will be editing the the database at the same time. I am using flask-sqlalchemy for ORM. My question is do I need to ...
-1
votes
0answers
26 views

Exchange data between python and angular with flask

I am trying to determine which is the best arquitecture to my application, I am planning to use python, mysql, angular and flask as an intermediate between python and angular. I have all the shots of ...
1
vote
1answer
83 views

Flask restful file upload asynchronously?

I am working on converting an existing python based monolith solution to a microservice. The current flow is pretty straight forward: Accept XLSX as input -> Run some complex algorithms based on ...
3
votes
1answer
194 views

Do I actually need a message broker or are websockets enough?

The website I am building has a real-time messaging component. The backend is built with Flask and I have integrated Flask-SocketIO to handle Websocket connections when users are on the messaging page....
0
votes
2answers
51 views

Data Collection Web Application Architecture

I am building a Data Collection Web Application with Flask and MySQL Database. It is basically a creating a Bill Of Materials for the organization for a new product. Bill of Material in a form looks ...
0
votes
0answers
23 views

Flask/SQLAlchemy Object Classes across app layers

I’m looking for advice where the business logic and data layers in a Flask/SQLAlchemy-based app all use essentially the same object class. As an example, my app includes a task scheduler. Tasks ...
1
vote
2answers
862 views

REST API Input Validation Strategy

I am implementing a REST API and need to validate the JSON API inputs for the CREATE and UPDATE endpoints. The goal is to send a 400 error prior to doing any processing if the inputs are not valid. ...
0
votes
0answers
34 views

Service worker / caching a whole API in a Flask app?

I'm building a small scale app based on the Flask micro framework. In it, I have a service worker that caches the basic shell of my app (HTML, CSS and JS). However, I have dynamic content that is ...
1
vote
2answers
151 views

Architecture for RESTful API and a web admin

I am trying to build a RESTful API (using Flask) that will be later consumed by a mobile application. I also have a requirement to build a Web Admin. The Web Admin will have functionality that will ...
0
votes
1answer
44 views

Abstracting a set of services behind a common interface

Yay or nay? I have several related but separate services that are to be run in different processes. They execute a particular task unique to the service. Their call signature is similar, but the name ...
4
votes
2answers
587 views

Clearing up misconceptions about a Flask backend and client-side rendering

I am building a website and along the way I have come across a lot of things I didn't know about and was hoping to get some help in understanding some of them. I started building a website using ...
4
votes
1answer
1k views

Communication in a microservices architecture with flask and REST

Components involved: Mobile Client Microservices API Gateway Each microservice is a Flask application exposing a RESTful API. When a request is made by the mobile client, it is sent to the API ...
2
votes
1answer
32 views

An approach to send the contents of a file on the server to the client in real-time

I have a relatively simple front in good ol' JQuery, that makes a POST Request to a Flask Python web server, that runs a Python script using the subprocess module. Here's the whole route for ...
0
votes
1answer
114 views

Security and performance considerations when creating chat system on a Flask backend

I am building a website with the Flask framework. One functionality of the site will be that users can send messages to each other. I created a prototype of this using Flask WTF forms. The basic ...
0
votes
2answers
33 views

Organizing specific human messaging in the web applicaiton code

Python (Flask) web application has a big portion of email/SMS messages generated by templates, translated by Flask-Babel. To my eye, having literal constants for the message in views, among other ...
3
votes
2answers
773 views

Two processes in a single docker container or two services connecting to the same db?

I recently started moving a monolithic application to microservices architecture using docker containers. The general idea of the app is: scraping data -> format the data -> save the data to MySQL -...
13
votes
1answer
10k views

Why is flask CLI recommended over Flask.run?

In Flask 0.11 a flask CLI was introduced. Both the docs and the changelog state this is recommended. Development Server docs: Starting with Flask 0.11 there are multiple built-in ways to run a ...
1
vote
0answers
174 views

Choosing Between Ruby and Python for a FS Microservice Backend in Node App [closed]

I have been working on a application that up until now has been pure Node. However I am concerned about performance and overhead since the application performs a lot of file system operations (Copy ...
5
votes
1answer
674 views

How to think about a schedule that pulls from a database as objects

I am working on a personal project using Python. I have been using version control to the best of my abilities and if you would like to check it out and run the app https://github.com/CodeAmend/old-...
1
vote
1answer
683 views

Hard time understanding structure of web apps w JS frameworks? [closed]

I'm having a difficult time understanding how web applications work. Please help me understand without giving me google definitions. Baby steps/words would be appreciated =) From what I understand so ...
0
votes
1answer
639 views

How to stop someone from calling URL on server

I am very new to web development and am trying to create a website using client/server model. From what I understand, the front-end (client-side) calls URLs specified on the server to get information. ...
2
votes
1answer
106 views

Security Pattern to store SSH Keys

I am writing a simple flask application to submit scientific tasks to remote HPC resources. My application in background talks to remote machines via SSH (because it is widely available on various HPC ...
12
votes
3answers
6k views

Global request context - anti-pattern?

I was talking today to a colleague of mine about Python web frameworks and our impressions about them. I told him I think Flask having a global request smells badly and is an anti-pattern. The docs ...
0
votes
1answer
746 views

Why does flask use Jinja2 and not xpath?

I'm just starting out with python and since I'm coming from a PHP background (thus have to adjust my mind to wrap around new concepts) one major question still stands without answer - why does Flask ...
3
votes
1answer
682 views

How safe is it to rely on thirdparty Python libs in a production product?

I'm new to Python and come from the write-everything-yourself world of PHP (at least this is how I always approached it). I'm using Flask, WTForms, Jinja2, and I've just discovered Flask-Login which ...
7
votes
1answer
5k views

How to divide work among development team members in a website project using MVC pattern

I am working on a webapp project using flask framework and sqlalchemy orm in python. Its the first time I am working on a project like this and I am having trouble in how to divide work properly among ...
5
votes
1answer
2k views

How do I structure a larger Flask application?

I have a relatively simple web application that is written in Python using the Flask microframework. I've really enjoyed Flask's ease of use, however, as the app has grown larger it has started to ...