/r/flask

Photograph via snooOG

Flask is a Python micro-framework for web development. Flask is easy to get started with and a great way to build websites and web applications.

Use Python and Flask to build the web faster

Use [Ask Flask] or [AF] if you have a very specific problem and need help with code.

Use [Extension-name] if you are discussing a certain extension to Flask.

Also check out /r/python or /r/django

Websites built with Flask

Getting Started

Flask Hosting

  • PythonAnywhere.com (web-SSH; web-instant-MySQL-db; web-IDE; instant deployment of flask, free; easy logs; github/single-file-upload support; SFTP/SSH requires pay)
  • Heroku (SSH; flask must be installed by you, slightly-difficult-windows-instructions, upgradeable cloud service)
  • WebFaction (SSH; paid-web-host [good prices]; flask must be installed by you; possible configuration and path issues possible; SFTP)
  • Google App Engine (Desktop admin app; flask can be configured with this repo)
  • OpenShift (requires extensive ssh installation of ruby, python, etc.)

Looking for dev jobs?

/r/flask

87,577 Subscribers

0

Problem with sending email system

i'm trying to config a Gmail account's email server, bit when i run the application, i receive this error:

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  
https://support.google.com/mail/?p=BadCredentials
 5b1f17b1804b1-438e244f38esm124208605e9.26 - gsmtp')

My configuration is:

MAIL_SERVER=smtp.googlemail.com
MAIL_PORT=587
MAIL_USE_TLS=1
MAIL_USERNAME=my.username1234
MAIL_PASSWORD=my google app password (I tried to write it attached but i receive the same error)

6 Comments
2025/02/02
15:08 UTC

5

I made this! Flask and Jinja templates, and MongoDB for the database.

7 Comments
2025/02/02
14:15 UTC

2

Suggest me free Flask course or tutorial

I've learned Python fundamentals and frontend. Now I want to start learning Flask for backend. I've tried Miguel Grinberg's course. But I failed to understand.

Can you guys suggest me some other good Flask courses or tutorials that start from beginner topics and cover advanced topics?

14 Comments
2025/02/01
13:07 UTC

1

Problem with connection with server

I'm creating a flask app following the mega-tutorial of Miguel. I'm trying to send an email to me but i receive this error:

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

How can i resolve it? I think because the client port is different from server port.

1 Comment
2025/02/01
12:36 UTC

12

Running a Python flask app 24/7 on a cloud server

I have a Python flask web application that takes the data from a shopify webhook and appends rows to Google sheet. Since it is a webhook, I want it to be running 24/7 as customers can place orders round the clock. I have tested it on my local machine and the code works fine but since then, I have tested it on Render, Railway.app and Pythonanywhere and none of those servers are working with the webhook data or are running 24/7. How can I run the app 24/7 on a cloud server?

The code runs fine on Railway.app and Render and authenticates the OAuth but when the webhooks is tested, it does not generate any response and moreover the app stops running after a while.

I tested the same app on my local machine using ngrok and every time a new order is placed, it does generate the expected results (adds rows to Google sheet).

18 Comments
2025/02/01
01:25 UTC

0

Are you a bot? (AI Model Testing)

6 Comments
2025/01/31
20:11 UTC

5

What do you guys use for re-usable components in front end?

Been googling about this and I hear about Jinjax, Htpy, etc. but im not familiar with any of them.
What do you guys use to create re-usable components in your flask app.

6 Comments
2025/01/31
09:11 UTC

3

Tutorials with good frontend

What are some good Flask tutorials that actually have good frontend UI?
I'm wanting to follow along with a tutorial that gets more in depth into an actual real use case instead of just a simple form

7 Comments
2025/01/31
00:03 UTC

0

Host your Python app for $1.28 a month (Flask app)

0 Comments
2025/01/29
20:06 UTC

4

Any good Flask study resource or playlist?

All youtube videos I can search are already old. Which resource do you recommend?

9 Comments
2025/01/29
14:29 UTC

0

deployed my flask app, the apis donot work, help

index.html works well while the apis return 404 error in vercel, can anyone help me

1 Comment
2025/01/29
13:28 UTC

1

Struggling to Authenticate Google API Creds with Flask & Docker

Hi, I'm new to Flask and have built a simple webapp to parse a schedule in raw text and add it to a google calendar. The app works perfectly in a virtual python environment, but I decided to add rate limiting with Redis and Docker, and since then have been swamped with issues. At first the site wouldn't even load due to issues with Redis. Now it does, but when I attempt to authenticate Google API credentials, I get this error: An error occurred: [Errno 98] Address already in use. Can anyone here help me solve this?

8 Comments
2025/01/29
10:48 UTC

1

Alternatives to session and global variables in flask

I currently am making an app that will query weather data from an AWS bucket and display it on a map. Right now I am using global variables to store progress data (small dictionary that records amount of files read, if program is running, etc) and the names of files that match certain criteria. However, I understand this is bad pratice for a web app. When trying to look for alternatives, I discovered flask's session, but my "results" variable will need to store anywhere from 50-100 filenames, with the possibility of having up to 2700. From my understanding this list of files seems like way too much data for a session variable. When I tested the code, 5 filenames was 120 bytes, so I think that its pretty impossible to stay under 4kb. Does anyone have any ideas instead? Once a user closes the tab, the data is not important (there are download functions for maps and files). I would perfer not to use a db, but will if that is outright the best option.

6 Comments
2025/01/29
03:30 UTC

2

Problem with env variables

I'm trying to set up an email sending system. The problem is that if I set MAIL_SERVER and MAIL_PORT their values ​​always remain None. How can I solve it?

13 Comments
2025/01/28
17:56 UTC

2

Can't make Nginx see Gunicorn socket. Please help.

Edit

Found the answer: as of jan/2025, if you install nginx following the instructions on Nginx.org for Ubuntu, it will install without nginx-common and will never find any proxy_pass that you provide. Simply install the version from the Ubuntu repositories and you will be fine. Find the complete question below, for posterity.


Hi all.

I´m trying to install a Nginx/Gunicorn/Flask app (protocardtools is its name) in a local server following this tutorial.

Everything seems to work fine down to the last moment: when I run sudo nginx -t I get the error "/etc/nginx/proxy_params" failed (2: No such file or directory) in /etc/nginx/conf.d/protocardtools.conf:22

Gunicorn seems to be running fine when I do sudo systemctl status protocardtools

Contents of my /etc/nginx/conf.d/protocardtools.conf:

server {
    listen 80;
    server_name cards.proto.server;

    location / {
        include proxy_params;
        proxy_pass http://unix:/media/media/www/www-protocardtools/protocardtools.sock;
    }
}

Contents of my /etc/systemd/system/protocardtools.service:

[Unit]
Description=Gunicorn instance to serve ProtoCardTools
After=network.target

[Service]
User=proto
Group=www-data
WorkingDirectory=/media/media/www/www-protocardtools
Environment="PATH=/media/media/www/www-protocardtools/venv/bin"
ExecStart=/media/media/www/www-protocardtools/venv/bin/gunicorn --workers 3 --bind unix:protocardtools.sock -m 007 wsgi:app

[Install]
WantedBy=multi-user.target

Can anyone please help me shed a light on this? Thank you so much in advance.

19 Comments
2025/01/28
14:49 UTC

0

Windows Hotspot

I am trying to run my web app via my windows hotspot on my laptop but the application seems unable to listen on the hotspot. I have tried listening on my laptops hotspot interface (192.168.137.1) and all interfaces (0.0.0.0) when listening on all interfaces my hotspot interface does not appear in the list. Is there a way to resolve this? Would this application work on the hotspot from a Raspberry Pi? Happy to provide selected code snippets as required but much of the code is sensitive so won't be uploaded in an uncensored form.

3 Comments
2025/01/28
10:27 UTC

2

How to manage multiple files from multiple users?

So I have a server which takes files from the user, process it and return the processed files back to the user.

For example, a user uploads 2 files, server process that 2 files and returns 2 new files back.

Now if there are 10 users using the application at the same time, sending 2 files each, how to make sure that they get back their respective files??

Edit: One way i can think if is using unique id to store each files in a separate directory or something of sort but is there any more efficient way to achieve this as i need to scale this application to atleast handle 1000 users at a time

10 Comments
2025/01/28
08:00 UTC

1

Question about implementation of sending emails

I'm creating a web application following Miguel's mega-tutorial.
I'm on lesson 7 and I've encountered a problem: for some reason, despite having intentionally caused an error in my site, no message appears in the second terminal where aiosmtpd is running.
I don't understand why nothing appears. These are my bits of code that I used to try to make this stuff work:

in config file:

import os

basedir = os.path.abspath(os.path.dirname(__file__))  # Questa variabile immagazzina il percorso della directory principale sottoforma di stringa

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or b'mykey'
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
        'sqlite:///' + os.path.join(basedir, 'app.db')
    
    MAIL_SERVER = os.environ.get('MAIL_SERVER')
    MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
    MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
    MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
    MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
    ADMINS = ['mymail@example.com']

in init file:

from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
import logging
from logging.handlers import SMTPHandler


app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
login = LoginManager(app)
login.login_view = 'login'

if not app.debug:  # Dopo devo controllare.
    if app.config['MAIL_SERVER']:
        auth = None
        if app.config['MAIL_USERNAME'] or app.config['MAIL_PASSWORD']:
            auth = (app.config['MAIL_USERNAME'], app.config['MAIL_PASSWORD'])
        secure = None
        if app.config['MAIL_USE_TLS']:
            secure = ()
        mail_handler = SMTPHandler(
            mailhost=(app.config['MAIL_SERVER'], app.config['MAIL_PORT']),
            fromaddr='no-reply@' + app.config['MAIL_SERVER'],
            toaddrs=app.config['ADMINS'], subject='Microblog Failure',
            credentials=auth, secure=secure)
        mail_handler.setLevel(logging.ERROR)
        app.logger.addHandler(mail_handler)


from app import routes, models, errors  # Metto questa riga alla fine del file perché in routes e models importo alcune delle variabili sopra,
                                        # per cui se importassi i due moduli all'inizio di questo file avrei problemi di importazione
2 Comments
2025/01/27
20:47 UTC

2

How do I host flask web application on ubuntu VPS? (hostinger)?

recently i purchased a vps from hostinger but unfortunately there's no support for python flask but it allows various apps, panels, and plain OS as well. but i genuinely don't know what I'm doing. and I do want to connect a custom domain as well.

18 Comments
2025/01/26
19:46 UTC

4

Flask-alchemy create Models

Hey Guys and Girls,

I´m wondering about a lot over Tutorials. I´m workin on my first little Flask Web App. I´m a student for Media Tech with intermediate or better good understanding whatsoever.

In many Tutorials this "Mapped" SQLALchemy 2.0 style just does not exist. Why is that? Is there any big difference?

The SQL ALchemy Tutorial tells me to use that style over the old style... I dont get it.

Or it is like Flask-alchemy is using the old style?

# SQL ALCHEMY 2.0 STYLE

class Base(DeclarativeBase):
    pass

db = SQLAlchemy(model_class=Base)

class Sailor(Base):
    __tablename__ = 'sailor'
    id: Mapped[int] = mapped_column(primary_key=True)
    username: Mapped[str] = mapped_column(String(50), nullable=False)
    password: Mapped[str] = mapped_column(String(50), nullable=False)

#S SQL ALCHEMY OLD STYLE

class Sailor(db.base):
  __tablename__ = 'sailor'
  id = db.Column(db.Integer, primary_key = True)
  etc....

9 Comments
2025/01/26
11:23 UTC

2

Help Needed: Unable to Update Field Values in Web App (304 Not Modified Issue)

Hi All,

Hi everyone,
I'm working on a small project involving web application development. While I can successfully create records for users, I'm running into trouble updating field values. Every time I try to update, I encounter a 304 Not Modified status response.

I suspect there's something wrong in my code or configuration, but I can't pinpoint the exact issue.

Here’s what I’d like help with:

  • Understanding why I might be receiving a 304 Not Modified status.
  • Identifying the part of the code I should focus on (frontend or backend).

Below is a brief overview of the technologies I’m using and relevant details:

  • Frontend: [HTML, CSS, JavaSCript]
  • Backend: [Python]
  • Database: [SQLAlchemy, MySQL]
  • HTTP Method for Update: POST, GET
  • Error Details:
    • 127.0.0.1 - - [25/Jan/2025 12:03:07] "GET /static/css/style.css HTTP/1.1" 304 -
    • 127.0.0.1 - - [25/Jan/2025 12:03:07] "GET /static/js/profile_details.js HTTP/1.1" 304 -
    • 127.0.0.1 - - [25/Jan/2025 12:03:07] "GET /static/images/default_placeholder.png HTTP/1.1" 304 -
    • 127.0.0.1 - - [25/Jan/2025 12:03:07] "GET /static/js/calendar_availability.js HTTP/1.1" 304 -
    • 127.0.0.1 - - [25/Jan/2025 12:03:23] "GET /static/css/style.css HTTP/1.1" 304 -

I’d appreciate any guidance or suggestions. If needed, I can share snippets of the relevant code. Thank you in advance!

https://preview.redd.it/3yx97bmpx6fe1.png?width=1119&format=png&auto=webp&s=490ad36a017d9bdf5e6c8b4c7a82be4f45d042be

https://preview.redd.it/dgme673sx6fe1.png?width=1142&format=png&auto=webp&s=b05a94a205915ac757dac49ce8166872f50d225e

18 Comments
2025/01/25
19:24 UTC

2

Example large open source rest API?

I started reading Indico, but looks like it is mostly a server rendered app rather than an API and SPA. Are there are other large examples that I can read that use Flask and SQLAlchemy?

1 Comment
2025/01/25
02:02 UTC

0

Quick Question - New to Flask

I created a python script that generates the "Turning LED on" text in a web browser using the Flask API. After finding success with printing the text to the web browser, I attempted to import the GPIOZERO library and use the script to literally turn on an LED. Unfortunately, I cannot get it to work. I would appreciate any help with troubleshooting the code.

I tried creating local variables under the defined method. Please see below:

----------------------------------------

from flask import Flask

from gpiozero import LED

app = Flask(__name__)

'@app*.route('/led/on')

def led_on():

....return "Turning on the LED"

....return {'status': True}

....led = LED(17)

....green.on()

'@app*.route('/led/off')

def led_off():

....return "Turning off the LED"

....led = LED(17)

....green.off()

-------------------------------------------

Thanks in advance for the help!

6 Comments
2025/01/24
22:22 UTC

0

Need Help deploying React + Flask

Hi, flask newbie here

i spent quite a while developing a react and flask application thats pretty simple,

react fronend, sends post requests and get requests to flask backend, uses routing aswell.

i had it up working fine with localhost:5000 and localhost:3000 and now I'm trying to deploy it,
tried to use Dockerfile with render and deploy them both at the same time, ended up being really frustrating so i switched to using a digitalocean droplet, and following a tutorial that got me setup with nginx, but because my flask backed doesnt really display anything i am having trouble debugging - i set up a system service on the droplet (just a linux vm) so a gunicorn process is alway running, but i cant visit it properly. also i have a domain but it doenst seemt o work with nginx.

any advice on deployment?
Thanks

1 Comment
2025/01/24
20:38 UTC

1

Need help in getting zip files from Postman on Flask server and using it

from
 flask 
import
 Flask, redirect, url_for, Blueprint, request, jsonify
from
 myproject 
import
 db 
from
 myproject.manager.models 
import
 Manager, Events
from
 flask_jwt_extended 
import
 create_access_token, jwt_required, get_jwt_identity
from
 datetime 
import
 datetime
import
 zipfile
import
 os
from
 io 
import
 BytesIO
from
 werkzeug.utils 
import
 secure_filename

manager_bp = Blueprint('manager_bp' ,__name__)


@manager_bp.route('/sign-up/', 
methods
=['POST'])
def sign_up():
    data = request.json
    email = data.get('email')
    password_h = data.get('password')

    
if
 not email or not password_h:
        
return
 jsonify({'success': False, 'error': 'Missing required fields'}), 400


    existing_manager = Manager.query.filter_by(
email
=email).first()
    
if
 existing_manager:
        
return
 jsonify({'success': False, 'error': 'manager with this email already exists'}), 400

    new_manager = Manager(
email
 = email , 
password
 = password_h)
    db.session.add(new_manager)
    db.session.commit()

    
# Generate JWT Token
    access_token = create_access_token(
identity
=email)

    
return
 jsonify({"success": True, "message": "Manager created successfully!", "access_token": access_token}), 201



@manager_bp.route('/login' , 
methods
=['POST'])
def login():
    data = request.json

    email = data.get('email')
    password = data.get('password')

    
if
 not email or not password:
        
return
 jsonify({'error': 'Email and password are required'}), 400

    manager = Manager.query.filter_by(
email
=email).first()

    
if
 manager is None or not manager.check_password(password):
        
return
 jsonify({'error': 'Invalid email or password'}), 401

    access_token = create_access_token(
identity
=email)
    
return
 jsonify({'success': True, 'access_token': access_token}), 200


@manager_bp.route('/logout', 
methods
=['POST'])
@jwt_required()
def logout():
    
return
 jsonify({'message': 'Successfully logged out, but the token is invalidated on client side.'}), 200


@manager_bp.route('/create-event', 
methods
=['POST'])
@jwt_required()
def create_event():
    data = request.json
    event_name = data.get('event_name')
    description = data.get('description')
    date_str = data.get('date') 
# YYYY-MM-DD
    organised_by = data.get('organised_by')

    
if
 not event_name or not description or not date_str:
        
return
 jsonify({'success': False, 'error': 'Missing required fields'}), 400

    
try
:
        date = datetime.strptime(date_str, '%Y-%m-%d').date()
    
except
 ValueError:
        
return
 jsonify({'success': False, 'error': 'Invalid date format. Use YYYY-MM-DD.'}), 400

    new_event = Events(
event_name
=event_name, 
description
=description, 
date
=date, 
organised_by
=organised_by)
    db.session.add(new_event)
    db.session.commit()

    
return
 jsonify({"success": True, "message": "Event created successfully!"}), 201


@manager_bp.route('/events', 
methods
=['GET'])
@jwt_required()
def get_events():
    events = Events.query.all()
    events_list = []
    
for
 event 
in
 events:
        events_list.append({
            'event_name': event.event_name,
            'description': event.description,
            'date': event.date.strftime('%Y-%m-%d'),
            'organised_by': event.organised_by
        })
    
return
 jsonify(events_list), 200


@manager_bp.route('/event-details', 
methods
=['GET', 'POST'])
@jwt_required()
def get_event_details():
    
if
 request.method == 'GET':
        event_name = request.args.get('event_name')
    
else
:  
# POST
        data = request.json
        event_name = data.get('event_name')

    print(f"Received event_name: {event_name}")  
# Debug statement

    
if
 not event_name:
        
return
 jsonify({'success': False, 'error': 'Event name is required'}), 400

    event = Events.query.filter_by(
event_name
=event_name).first()

    
if
 not event:
        
return
 jsonify({'success': False, 'error': 'Event not found'}), 404

    
return
 jsonify({
        'success': True,
        'event': {
            'event_name': event.event_name,
            'description': event.description,
            'date': event.date,
            'organised_by': event.organised_by
        }
    }), 200


@manager_bp.route('/upload-images', 
methods
=['POST'])
@jwt_required()
def upload_images():
    
# Validate content type and file presence
    
# if not request.content_type.startswith('multipart/form-data'):
    
#     return jsonify({'success': False, 'error': 'Content-Type must be multipart/form-data'}), 415

    
if
 'file' not in request.files:
        
return
 jsonify({'success': False, 'error': 'No file part'}), 400

    file = request.files['file']
    
if
 file.filename == '':
        
return
 jsonify({'success': False, 'error': 'No selected file'}), 400

    
if
 not zipfile.is_zipfile(file):
        
return
 jsonify({'success': False, 'error': 'File is not a zip file'}), 400

    event_name = request.form.get('event_name')
    
if
 not event_name:
        
return
 jsonify({'success': False, 'error': 'Event name is required'}), 400

    event = Events.query.filter_by(
event_name
=event_name).first()
    
if
 not event:
        
return
 jsonify({'success': False, 'error': 'Event not found'}), 404

    
# Create a secure directory for extraction
    extract_path = os.path.join('uploads', secure_filename(event_name))
    os.makedirs(extract_path, 
exist_ok
=True)

    
try
:
        
# Extract the zip file
        
with
 zipfile.ZipFile(file, 'r') 
as
 zip_ref:
            
# Validate files before extraction
            invalid_files = [f 
for
 f 
in
 zip_ref.namelist() 
if
 not f.lower().endswith(('.png', '.jpg', '.jpeg'))]
            
if
 invalid_files:
                
return
 jsonify({
                    'success': False, 
                    'error': f'Invalid files found: {", ".join(invalid_files)}. Only .png, .jpg, .jpeg allowed.'
                }), 400

            zip_ref.extractall(extract_path)

        
# Process each image
        embeddings = []
        
for
 root, dirs, files 
in
 os.walk(extract_path):
            
for
 filename 
in
 files:
                
if
 filename.lower().endswith(('.png', '.jpg', '.jpeg')):
                    image_path = os.path.join(root, filename)
                    
                    
# Generate embedding for the image
                    
try
:
                        embedding = generate_embedding(image_path)
                        embeddings.append({
                            'event_id': event.id,
                            'image_name': filename,
                            'embedding': embedding
                        })
                    
except
 Exception 
as
 e:
                        print(f"Error processing {filename}: {str(e)}")
                        
# Optionally, you could choose to continue or return an error

        
# Batch insert embeddings
        
if
 embeddings:
            bulk_embeddings = [
                ImageEmbedding(
                    
event_id
=emb['event_id'], 
                    
image_name
=emb['image_name'], 
                    
embedding
=emb['embedding']
                ) 
for
 emb 
in
 embeddings
            ]
            db.session.bulk_save_objects(bulk_embeddings)
            db.session.commit()

        
return
 jsonify({
            "success": True, 
            "message": f"Processed {len(embeddings)} images successfully!",
            "total_images": len(embeddings)
        }), 201

    
except
 Exception 
as
 e:
        db.session.rollback()
        
return
 jsonify({
            'success': False, 
            'error': f'Upload processing failed: {str(e)}'
        }), 500
    
finally
:
        
# Clean up extracted files
        
if
 os.path.exists(extract_path):
            
import
 shutil
            shutil.rmtree(extract_path)


def generate_embedding(
image_path
):
    """
    Generate image embedding using a machine learning model.
    Replace with your actual embedding generation logic.
    
    Args:
        image_path (str): Path to the image file
    
    Returns:
        list: Image embedding vector
    """
    
# Example placeholder - replace with actual embedding generation
    
from
 PIL 
import
 Image
    
import
 numpy 
as
 np
    
    
# Open and preprocess image
    img = Image.open(
image_path
)
    img = img.resize((224, 224))  
# Typical size for many ML models
    
    
# Dummy embedding generation
    
# In real-world, you'd use a pre-trained model like ResNet or VGG
    
return
 np.random.rand(128).tolist()

Hello, this the manager/views.py, I want to get a zip file and event_name from front-end and this will unzip the file, generate embeddings of all the images and store is in the db, in the form of event_name_1.png.....

when I try to do this using Postman, I get this :

https://preview.redd.it/ontqz8jiryee1.png?width=972&format=png&auto=webp&s=a867db5094671def6177e50b106945fa9c8a04fd

Please can someone help me here.

Thankyou so much for your time

2 Comments
2025/01/24
15:55 UTC

0

Does flask have an inbuilt logger and also web error handling capacity instead of using my own custom log db?

Over the past few weeks , I’ve been delving into Flask web development, and the progress has been incredibly rewarding. I’ve implemented user registration and login with secure password hashing, added TOTP-based OTP verification to ensure account security, and integrated Flask-Mail for sending verification emails.

Managing database models with sqlalchemy has been a game changer for me. Initially I resorted to Cs50's SQL which was way cooler. But the SQLAlchemy integrates better with flask as I've come to experience. I’ve also added custom logging to track user actions like logins, OTP verification, and profile updates.

It's been mostly Trial and error but it's been fun seeing the understanding I'm getting about how websites work under the hood just by building one😃

In addition to my question above, what more can I implement with flask to make my web app more secure if deployed on the web...

I would really appreciate your input🙏🏿

12 Comments
2025/01/24
15:45 UTC

0

Fastapi deployment posting here for help

Newbie in Deployment: Need Help with Managing Load for FastAPI + Qdrant Setup

I'm working on a data retrieval project using FastAPI and Qdrant. Here's my workflow:

  1. User sends a query via a POST API.

  2. I translate non-English queries to English using Azure OpenAI.

  3. Retrieve relevant context from a locally hosted Qdrant DB.

I've initialized Qdrant and FastAPI using Docker Compose.

Question: What are the best practices to handle heavy load (at least 10 requests/sec)? Any tips for optimizing this setup would be greatly appreciated!

Please share Me any documentation for reference thank you

8 Comments
2025/01/24
04:38 UTC

2

Python flask hosting help

Hello i am still relatively new to programming and developed a python flask app that uses openai api call to respond to user input. My application works fine locally but continues to crash during the build whenever i try to host it. Ive tried Vercel as well as Digital Ocean and Fly.io

6 Comments
2025/01/23
19:26 UTC

Back To Top