Skip to main content

Questions tagged [flask]

Flask is a web application framework for Python.

0 votes
3 answers
196 views

Architecture to avoid circular imports in Python, specifically a flask server

I have a flask server which uses a controller-service-resource model. For simplification it is like this: Controller(parses requests, dispatches to A or B): ServiceA ServiceB However there are ...
VectorVictor's user avatar
1 vote
2 answers
100 views

Dynamic web application hitting database on front page load to fetch profile image

Folks, I am in middle of writing a web application (Python/Flask) where home page has user profile image in the navbar which is coming from a database (blob), I am wondering if this is a good practice....
afsar's user avatar
  • 19
0 votes
0 answers
43 views

Best design pattern for integrating Google OAuth with existing JWT token-based authentication system

We currently have a backend authentication mechanism in place that utilizes JWT tokens. Users sign in or sign up using email and password, and upon successful authentication, the backend issues JWT ...
Samiksha Garg's user avatar
2 votes
1 answer
323 views

What really is a "web server" in relation to popular frameworks like Flask, Node.js, Apache?

In Flask you can run a "webserver". Well really it's a "WSGI Server". Well really you shouldn't be using core server features like serving files through HTTP at all, you should be ...
Leftover Salad's user avatar
-1 votes
1 answer
103 views

Is it practical to cache multiple instances of variable API data (updates hourly for each instance) for N users?

I'm using flask with SQLAlchemy on a postgresql database for a mobile app I'm building. My application allows a single user to save lets say up to 5 different locations which are saved in the database....
joepaji's user avatar
1 vote
0 answers
1k views

Authorization using Azure AD B2C access tokens in Python / Flask

TLDR: I am trying to validate a Azure AD B2C access token in my Flask web API use scopes from that access token to authorize calling protected resources use timely and secure solutions such as PKCE ...
linus's user avatar
  • 121
-1 votes
2 answers
262 views

What is the best practice of conditions style in Python?

We have a function that processes the user request if it is not None, how best to style it? I did not find a better choice in PEP8 Style 1 def user_handler(user): if db.getUser(user) is not None: ...
RoyalGoose's user avatar
0 votes
0 answers
407 views

HTTPS headless browser to HTTP localhost Flask

I have two Docker containers: Headless browser grabbing images by running JavaScript Flask server analysing these images (and sending results to another server) I'm using a bridge network to ...
Sijmen's user avatar
  • 9
1 vote
0 answers
82 views

What's the best way to build a Flask API to control and show the status of a program tool I have built?

I've developed a backend project using Python. It collects data from different sources, process the data, and then perform actions with it (for example, store relevant info in a database). To execute ...
p0kero's user avatar
  • 11
2 votes
1 answer
96 views

Manager node makes HTTP request to self?

I am working on a distributed application that uses the Manager Worker pattern. The application's manager node submits work to worker nodes through a WorkerNode object (allowing WorkerNode to be ...
Stephen Collins's user avatar
-2 votes
2 answers
1k views

Should I use Flask w/ Javascript OR a Javascript UI that calls a Flask / Connexion API?

I recently wrote a data management tool in Python & SQLAlchemy. Now, I need to put a web UI on it. While I want to start small, there is some need for interactivity, like drag and drop in tables, ...
Ben's user avatar
  • 115
-3 votes
1 answer
82 views

Sharing data among websites

I manage one middle sized website that uses Flask and PostgresSQL on the backend and some JS with Angular and Jinja2 templates on the fronted. Now we're going to create a second website that will be ...
AlejandroVK's user avatar
-4 votes
1 answer
101 views

Keeping JSON in database

I'm trying to create web app(flask or django-rest) that would scrape some data and save it to JSON so that it can be viewed in the frontend (VueJS). I'm wondering if it is better to save the scraped ...
Alex T's user avatar
  • 161
1 vote
1 answer
65 views

System design : Implementing a common service process with a http server

I have a huge DB,and CalculateTasksFromDB() takes a long time (and lots of memory). Once that method is done,there is a huge list of tasks. There are worker processes in the system (at any point in ...
yoni keren's user avatar
1 vote
0 answers
995 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 ...
Paulo Schreiner's user avatar

15 30 50 per page