python and Flask
I am using Python with Flask to create a secure login portal. Since I have a QA exam, could you tell me what theory and practical questions the QA team might ask?
/r/flask
https://redd.it/1kmhiri
I am using Python with Flask to create a secure login portal. Since I have a QA exam, could you tell me what theory and practical questions the QA team might ask?
/r/flask
https://redd.it/1kmhiri
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
What network/data analysis projects are you building in Python?
I've been working on some tools to analyze detailed API performance data — things like latency, error rates, and concurrency patterns from load tests, mostly using Python, pandas, and notebooks.
Got me wondering: what kinds of network-related data projects are people building these days?
Always up for swapping ideas — or just learning what’s out there.
/r/Python
https://redd.it/1knvl0u
I've been working on some tools to analyze detailed API performance data — things like latency, error rates, and concurrency patterns from load tests, mostly using Python, pandas, and notebooks.
Got me wondering: what kinds of network-related data projects are people building these days?
Always up for swapping ideas — or just learning what’s out there.
/r/Python
https://redd.it/1knvl0u
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Hi there, I'm new here and I need a partner to learn Django with through discord
/r/djangolearning
https://redd.it/1knv0m8
/r/djangolearning
https://redd.it/1knv0m8
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
D presenting a paper virtually in ACL findings - should we?
Hi everyone.
Our paper (mine and colleagues) has been accepted to ACL findings. This is the first paper of mine that got accepted, so i am very excited and happy.
ACL findings papers are not required to be presented. They give you an option to present it, and if you choose to present it you can do it in person or virtually.
Unfortunately none of us are able to do it in person and fly to the conference. So the question becomes "is it worth it to present it virtually?".
I would love to hear what people think and experiences you had when presenting virtually.
Thanks.
/r/MachineLearning
https://redd.it/1knvsib
Hi everyone.
Our paper (mine and colleagues) has been accepted to ACL findings. This is the first paper of mine that got accepted, so i am very excited and happy.
ACL findings papers are not required to be presented. They give you an option to present it, and if you choose to present it you can do it in person or virtually.
Unfortunately none of us are able to do it in person and fly to the conference. So the question becomes "is it worth it to present it virtually?".
I would love to hear what people think and experiences you had when presenting virtually.
Thanks.
/r/MachineLearning
https://redd.it/1knvsib
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Which library would you choose Pygame or Arcade?
which library would you guys choose if making a game similar to mini millitia for steam, i see both libraries are good and have community support also , but still which one would you choose or if any other options , do comment
/r/Python
https://redd.it/1knwiyt
which library would you guys choose if making a game similar to mini millitia for steam, i see both libraries are good and have community support also , but still which one would you choose or if any other options , do comment
/r/Python
https://redd.it/1knwiyt
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
P TTSDS2 - Multlingual TTS leaderboard
A while back, I posted about my TTS evaluation metric TTSDS, which uses an ensemble of perceptually motivated, FID-like scores to objectively evaluate synthetic speech quality. The original thread is here, where I got some great feedback:
https://www.reddit.com/r/MachineLearning/comments/1e9ec0m/p\_ttsds\_benchmarking\_recent\_tts\_systems/
Since then, I've finally gotten around to updating the benchmark. The new version—TTSDS2—is now multilingual, covering 14 languages, and generally more robust across domains and systems.
⭐ Leaderboard: ttsdsbenchmark.com#leaderboard
📄 Paper: https://arxiv.org/abs/2407.12707
The main idea behind TTSDS2 is still the same: FID-style (distributional) metrics can work well for TTS, but only if we use several of them together, based on perceptually meaningful categories/factors. The goal is to correlate as closely as possible with human judgments, without having to rely on trained models, ground truth transcriptions, or tuning hyperparameters. In this new version, we get a Spearman correlation above 0.5 with human ratings in every domain and language tested, which none of the other 16 metrics we compared against could do.
I've also put in place a few infrastructure changes. The benchmark now reruns automatically every quarter, pulling in new systems published in the previous quarter. This avoids test set contamination. The test sets themselves are also regenerated periodically using a reproducible pipeline. All TTS
/r/MachineLearning
https://redd.it/1knwaf7
A while back, I posted about my TTS evaluation metric TTSDS, which uses an ensemble of perceptually motivated, FID-like scores to objectively evaluate synthetic speech quality. The original thread is here, where I got some great feedback:
https://www.reddit.com/r/MachineLearning/comments/1e9ec0m/p\_ttsds\_benchmarking\_recent\_tts\_systems/
Since then, I've finally gotten around to updating the benchmark. The new version—TTSDS2—is now multilingual, covering 14 languages, and generally more robust across domains and systems.
⭐ Leaderboard: ttsdsbenchmark.com#leaderboard
📄 Paper: https://arxiv.org/abs/2407.12707
The main idea behind TTSDS2 is still the same: FID-style (distributional) metrics can work well for TTS, but only if we use several of them together, based on perceptually meaningful categories/factors. The goal is to correlate as closely as possible with human judgments, without having to rely on trained models, ground truth transcriptions, or tuning hyperparameters. In this new version, we get a Spearman correlation above 0.5 with human ratings in every domain and language tested, which none of the other 16 metrics we compared against could do.
I've also put in place a few infrastructure changes. The benchmark now reruns automatically every quarter, pulling in new systems published in the previous quarter. This avoids test set contamination. The test sets themselves are also regenerated periodically using a reproducible pipeline. All TTS
/r/MachineLearning
https://redd.it/1knwaf7
Reddit
From the MachineLearning community on Reddit: [P] TTSDS - Benchmarking recent TTS systems
Explore this post and more from the MachineLearning community
RouteSage - Documentation of FastAPI made easy
I have just built RouteSage as one of my side project. Motivation behind building this package was due to the tiring process of manually creating documentation for FastAPI routes. So, I thought of building this and this is my first vibe-coded project.
My idea is to set this as an open source project so that it can be expanded to other frameworks as well and more new features can be also added.
What My Project Does:
RouteSage is a CLI tool that uses LLMs to automatically generate human-readable documentation from FastAPI route definitions. It scans your FastAPI codebase and provides detailed, readable explanations for each route, helping teams understand API behavior faster.
Target Audience:
RouteSage is intended for FastAPI developers who want clearer documentation for their APIs—especially useful in teams where understanding endpoints quickly is crucial. This is currently a CLI-only tool, ideal for development or internal tooling use.
Comparison:
Unlike FastAPI’s built-in OpenAPI/Swagger UI docs, which focus on the structural and request/response schema, RouteSage provides natural language explanations powered by LLMs, giving context and descriptions not present in standard auto-generated docs. This is useful for onboarding, code reviews, or improving overall API clarity.
Your suggestions and validations are welcomed.
Link to project: https://github.com/dijo-d/RouteSage
https://routesage.vercel.app
/r/Python
https://redd.it/1knw6ie
I have just built RouteSage as one of my side project. Motivation behind building this package was due to the tiring process of manually creating documentation for FastAPI routes. So, I thought of building this and this is my first vibe-coded project.
My idea is to set this as an open source project so that it can be expanded to other frameworks as well and more new features can be also added.
What My Project Does:
RouteSage is a CLI tool that uses LLMs to automatically generate human-readable documentation from FastAPI route definitions. It scans your FastAPI codebase and provides detailed, readable explanations for each route, helping teams understand API behavior faster.
Target Audience:
RouteSage is intended for FastAPI developers who want clearer documentation for their APIs—especially useful in teams where understanding endpoints quickly is crucial. This is currently a CLI-only tool, ideal for development or internal tooling use.
Comparison:
Unlike FastAPI’s built-in OpenAPI/Swagger UI docs, which focus on the structural and request/response schema, RouteSage provides natural language explanations powered by LLMs, giving context and descriptions not present in standard auto-generated docs. This is useful for onboarding, code reviews, or improving overall API clarity.
Your suggestions and validations are welcomed.
Link to project: https://github.com/dijo-d/RouteSage
https://routesage.vercel.app
/r/Python
https://redd.it/1knw6ie
GitHub
GitHub - dijo-d/RouteSage
Contribute to dijo-d/RouteSage development by creating an account on GitHub.
db.init_app(app) Errror
Hi I am a compleat Noob (in flask), i have an Error in my Program that says: TypeError: SQLAlchemy.init\_app() missing 1 required positional argument: 'app' and i dont know what is wrong ):
This is the code pls Help me:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from os import path
db = SQLAlchemy
DB_NAME = "database.db"
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'hjshjhdjah kjshkjdhjs'
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{DB_NAME}'
db.init_app(app) #this thing makes the problem
from .views import views #thies are just website things
from .auth import auth
app.register_blueprint(views, url_prefix='/')
app.register_blueprint(auth, url_prefix='/')
from .models import User, Note #that are moduls for the data base
with app.app_context():
/r/flask
https://redd.it/1kmg69c
Hi I am a compleat Noob (in flask), i have an Error in my Program that says: TypeError: SQLAlchemy.init\_app() missing 1 required positional argument: 'app' and i dont know what is wrong ):
This is the code pls Help me:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from os import path
db = SQLAlchemy
DB_NAME = "database.db"
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'hjshjhdjah kjshkjdhjs'
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{DB_NAME}'
db.init_app(app) #this thing makes the problem
from .views import views #thies are just website things
from .auth import auth
app.register_blueprint(views, url_prefix='/')
app.register_blueprint(auth, url_prefix='/')
from .models import User, Note #that are moduls for the data base
with app.app_context():
/r/flask
https://redd.it/1kmg69c
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Is free threading ready to be used in production in 3.14?
I am currently using multiprocessing and having to handle the problem of copying data to processes and the overheads involved is something I would like to avoid. Will 3.14 have official support for free threading or should I put off using it in production until 3.15?
/r/Python
https://redd.it/1ko5f3k
I am currently using multiprocessing and having to handle the problem of copying data to processes and the overheads involved is something I would like to avoid. Will 3.14 have official support for free threading or should I put off using it in production until 3.15?
/r/Python
https://redd.it/1ko5f3k
How to filter related objects by attribute and pass to Django template?
Im working on a Django app where I have a group model with multiple sections, and each section has multiple items. Each item has a category (using TextChoices). I want to display items that belong to a certain category, grouped by section, in a view/template.
In other hands, i want to control where item is displayed based mainly the category. I want to display this is this kind of way (example):
Section 1 :
Items (that belong to section 1) Category 1
Section 2:
Items (that belong to section 2) from Category 1
Section 1:
Items from Category 3
Section 2:
Items from Category 4
etc..
I tried looking at Django's documentation, as well as asking AI, but i still struggle to understand how to structure this. Assuming I have many categories, i don't know how to assign them to the context.
Here's an example code i generated (and of course, checked) to explain my problem.
# MODELS
from django.db import models
class Item(models.Model):
class ItemCategory(models.TextChoices):
TYPE_A = "A", "Alpha"
/r/djangolearning
https://redd.it/1ko396g
Im working on a Django app where I have a group model with multiple sections, and each section has multiple items. Each item has a category (using TextChoices). I want to display items that belong to a certain category, grouped by section, in a view/template.
In other hands, i want to control where item is displayed based mainly the category. I want to display this is this kind of way (example):
Section 1 :
Items (that belong to section 1) Category 1
Section 2:
Items (that belong to section 2) from Category 1
Section 1:
Items from Category 3
Section 2:
Items from Category 4
etc..
I tried looking at Django's documentation, as well as asking AI, but i still struggle to understand how to structure this. Assuming I have many categories, i don't know how to assign them to the context.
Here's an example code i generated (and of course, checked) to explain my problem.
# MODELS
from django.db import models
class Item(models.Model):
class ItemCategory(models.TextChoices):
TYPE_A = "A", "Alpha"
/r/djangolearning
https://redd.it/1ko396g
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1kofmtf
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1kofmtf
YouTube
Data Structures and Algorithms in Python - Full Course for Beginners
A beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python. This course will help you prepare for coding interviews and assessments.
🔗 Course…
🔗 Course…
D Who do you all follow for genuinely substantial ML/AI content?
I've been looking for people to follow to keep up with the latest in ML and AI research/releases but have noticed there's a lot of low quality content creators crowding this space.
Who are some people you follow that you genuinely get substantial info from?
/r/MachineLearning
https://redd.it/1ko64s6
I've been looking for people to follow to keep up with the latest in ML and AI research/releases but have noticed there's a lot of low quality content creators crowding this space.
Who are some people you follow that you genuinely get substantial info from?
/r/MachineLearning
https://redd.it/1ko64s6
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Microsoft Fired Faster CPython Team
https://www.linkedin.com/posts/mdboom_its-been-a-tough-couple-of-days-microsofts-activity-7328583333536268289-p4Lp
This is quite a big disappointment, really. But can anyone say how the overall project goes, if other companies are also financing it etc.? Like does this end the project or it's no huge deal?
/r/Python
https://redd.it/1koev5c
https://www.linkedin.com/posts/mdboom_its-been-a-tough-couple-of-days-microsofts-activity-7328583333536268289-p4Lp
This is quite a big disappointment, really. But can anyone say how the overall project goes, if other companies are also financing it etc.? Like does this end the project or it's no huge deal?
/r/Python
https://redd.it/1koev5c
Linkedin
It's been a tough couple of days. Microsoft's support for the Faster CPython project was canceled yesterday, and my heart goes…
It's been a tough couple of days. Microsoft's support for the Faster CPython project was canceled yesterday, and my heart goes out to the majority of the team that was laid off. A hard day for me, but even harder for others.
If you are looking for top…
If you are looking for top…
What CPython Layoffs Taught Me About the Real Value of Expertise
The layoffs of the CPython and TypeScript compiler teams have been bothering me—not because those people weren’t brilliant, but because their roles didn’t translate into enough real-world value for the businesses that employed them.
That’s the hard truth: Even deep expertise in widely-used technologies won’t protect you if your work doesn’t drive clear, measurable business outcomes.
The tools may be critical to the ecosystem, but the companies decided that further optimizations or refinements didn’t materially affect their goals. In other words, "good enough" was good enough. This is a shift in how I think about technical depth. I used to believe that mastering internals made you indispensable. Now I see that: You’re not measured on what you understand. You’re measured on what you produce—and whether it moves the needle.
The takeaway? Build enough expertise to be productive. Go deeper only when it’s necessary for the problem at hand. Focus on outcomes over architecture, and impact over elegance. CPython is essential. But understanding CPython internals isn’t essential unless it solves a problem that matters right now.
/r/Python
https://redd.it/1kok2e1
The layoffs of the CPython and TypeScript compiler teams have been bothering me—not because those people weren’t brilliant, but because their roles didn’t translate into enough real-world value for the businesses that employed them.
That’s the hard truth: Even deep expertise in widely-used technologies won’t protect you if your work doesn’t drive clear, measurable business outcomes.
The tools may be critical to the ecosystem, but the companies decided that further optimizations or refinements didn’t materially affect their goals. In other words, "good enough" was good enough. This is a shift in how I think about technical depth. I used to believe that mastering internals made you indispensable. Now I see that: You’re not measured on what you understand. You’re measured on what you produce—and whether it moves the needle.
The takeaway? Build enough expertise to be productive. Go deeper only when it’s necessary for the problem at hand. Focus on outcomes over architecture, and impact over elegance. CPython is essential. But understanding CPython internals isn’t essential unless it solves a problem that matters right now.
/r/Python
https://redd.it/1kok2e1
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Skylos: Another dead code finder, but its better and faster. Source, Trust me bro.
# Skylos: The Python Dead Code Finder Written in Rust
Yo peeps
Been working on a static analysis tool for Python for a while. It's designed to detect unreachable functions and unused imports in your Python codebases. I know there's already Vulture, flake 8 etc etc.. but hear me out. This is more accurate and faster, and because I'm slightly OCD, I like to have my codebase, a bit cleaner. I'll elaborate more down below.
# What Makes Skylos Special?
* **High Performance**: Built with Rust, making it fast
* **Better Detection**: Finds more dead code than alternatives in our benchmarks
* **Interactive Mode**: Select and remove specific items interactively
* **Dry Run Support**: Preview changes before applying them
* **Cross-module Analysis**: Tracks imports and calls across your entire project
# Benchmark Results
|Tool|Time (s)|Functions|Imports|Total|
|:-|:-|:-|:-|:-|
|Skylos|0.039|48|8|56|
|Vulture (100%)|0.040|0|3|3|
|Vulture (60%)|0.041|28|3|31|
|Vulture (0%)|0.041|28|3|31|
|Flake8|0.274|0|8|8|
|Pylint|0.285|0|6|6|
|Dead|0.035|0|0|0|
This is the benchmark shown in the table above.
# How It Works
Skylos uses tree-sitter for parsing of Python code and employs a hybrid architecture with a Rust core for analysis and a Python CLI for the user interface. It handles Python features like decorators, chained method calls, and cross-mod references.
# Target Audience
Anyone with a **.py** file and a huge codebase that needs to kill off dead code? This ONLY
/r/Python
https://redd.it/1koi4fo
# Skylos: The Python Dead Code Finder Written in Rust
Yo peeps
Been working on a static analysis tool for Python for a while. It's designed to detect unreachable functions and unused imports in your Python codebases. I know there's already Vulture, flake 8 etc etc.. but hear me out. This is more accurate and faster, and because I'm slightly OCD, I like to have my codebase, a bit cleaner. I'll elaborate more down below.
# What Makes Skylos Special?
* **High Performance**: Built with Rust, making it fast
* **Better Detection**: Finds more dead code than alternatives in our benchmarks
* **Interactive Mode**: Select and remove specific items interactively
* **Dry Run Support**: Preview changes before applying them
* **Cross-module Analysis**: Tracks imports and calls across your entire project
# Benchmark Results
|Tool|Time (s)|Functions|Imports|Total|
|:-|:-|:-|:-|:-|
|Skylos|0.039|48|8|56|
|Vulture (100%)|0.040|0|3|3|
|Vulture (60%)|0.041|28|3|31|
|Vulture (0%)|0.041|28|3|31|
|Flake8|0.274|0|8|8|
|Pylint|0.285|0|6|6|
|Dead|0.035|0|0|0|
This is the benchmark shown in the table above.
# How It Works
Skylos uses tree-sitter for parsing of Python code and employs a hybrid architecture with a Rust core for analysis and a Python CLI for the user interface. It handles Python features like decorators, chained method calls, and cross-mod references.
# Target Audience
Anyone with a **.py** file and a huge codebase that needs to kill off dead code? This ONLY
/r/Python
https://redd.it/1koi4fo
Reddit
From the Python community on Reddit: Skylos: Another dead code finder, but its better and faster. Source, Trust me bro.
Explore this post and more from the Python community
[pyfuze] Make your Python project truly cross-platform with Cosmopolitan and uv
## What My Project Does
I recently came across an interesting project called [Cosmopolitan](https://github.com/jart/cosmopolitan). In short, it can compile a C program into an [Actually Portable Executable (APE)](https://justine.lol/ape.html) which is capable of running natively on **Linux**, **macOS**, **Windows**, **FreeBSD**, **OpenBSD**, **NetBSD**, and even **BIOS**, across both **AMD64** and **ARM64** architectures.
The Cosmopolitan project already provides a Python APE (available in [cosmos.zip](https://github.com/jart/cosmopolitan/releases)), but it doesn't support running your own Python project with multiple dependencies.
Recently, I switched from Miniconda to [uv](https://github.com/astral-sh/uv), an extremely fast Python package and project manager. It occurred to me that I could bootstrap **any** Python project using uv!
That led me to create a new project called [pyfuze](https://github.com/TanixLu/pyfuze). It packages your Python project into a single zip file containing:
* `pyfuze.com` — an APE binary that prepares and runs your Python project
* `.python-version` — tells uv which Python version to install
* `requirements.txt` — lists your dependencies
* `src/` — contains all your source code
* `config.txt` — specifies the Python entry point and whether to enable Windows GUI mode (which hides console)
When you execute `pyfuze.com`, it performs the following steps:
* Installs `uv` into the `./uv` folder
* Installs Python into the `./python` folder (version taken from `.python-version`)
* Installs dependencies listed in `requirements.txt`
* Runs your Python
/r/Python
https://redd.it/1koos2n
## What My Project Does
I recently came across an interesting project called [Cosmopolitan](https://github.com/jart/cosmopolitan). In short, it can compile a C program into an [Actually Portable Executable (APE)](https://justine.lol/ape.html) which is capable of running natively on **Linux**, **macOS**, **Windows**, **FreeBSD**, **OpenBSD**, **NetBSD**, and even **BIOS**, across both **AMD64** and **ARM64** architectures.
The Cosmopolitan project already provides a Python APE (available in [cosmos.zip](https://github.com/jart/cosmopolitan/releases)), but it doesn't support running your own Python project with multiple dependencies.
Recently, I switched from Miniconda to [uv](https://github.com/astral-sh/uv), an extremely fast Python package and project manager. It occurred to me that I could bootstrap **any** Python project using uv!
That led me to create a new project called [pyfuze](https://github.com/TanixLu/pyfuze). It packages your Python project into a single zip file containing:
* `pyfuze.com` — an APE binary that prepares and runs your Python project
* `.python-version` — tells uv which Python version to install
* `requirements.txt` — lists your dependencies
* `src/` — contains all your source code
* `config.txt` — specifies the Python entry point and whether to enable Windows GUI mode (which hides console)
When you execute `pyfuze.com`, it performs the following steps:
* Installs `uv` into the `./uv` folder
* Installs Python into the `./python` folder (version taken from `.python-version`)
* Installs dependencies listed in `requirements.txt`
* Runs your Python
/r/Python
https://redd.it/1koos2n
GitHub
GitHub - jart/cosmopolitan: build-once run-anywhere c library
build-once run-anywhere c library. Contribute to jart/cosmopolitan development by creating an account on GitHub.
Why does my Flask /health endpoint show nothing at http://localhost:5000/health?
Hey folks, I’m working on a Flask backend and I’m running into a weird issue.
I’ve set up a simple /health endpoint to check if the server is up. Here’s the code I’m using:
@app.route('/health', methods=['GET'])
def health_check():
return 'OK', 200
The server runs without errors, and I can confirm that it’s listening on port 5000. But when I open http://localhost:5000/health in the browser, I get a blank page or sometimes nothing at all — no “OK” message shows up on Safari while Chrome says “access to localhost was denied”.
What I expected:
A plain "OK" message in the browser or in the response body.
What I get:
Blank screen/access to localhost was denied (but status code is still 200).
Has anyone seen this before? Could it be something to do with the way Flask handles plain text responses in browsers? Or is there something else I’m missing?
Thanks in advance for any help!
/r/flask
https://redd.it/1kolnus
Hey folks, I’m working on a Flask backend and I’m running into a weird issue.
I’ve set up a simple /health endpoint to check if the server is up. Here’s the code I’m using:
@app.route('/health', methods=['GET'])
def health_check():
return 'OK', 200
The server runs without errors, and I can confirm that it’s listening on port 5000. But when I open http://localhost:5000/health in the browser, I get a blank page or sometimes nothing at all — no “OK” message shows up on Safari while Chrome says “access to localhost was denied”.
What I expected:
A plain "OK" message in the browser or in the response body.
What I get:
Blank screen/access to localhost was denied (but status code is still 200).
Has anyone seen this before? Could it be something to do with the way Flask handles plain text responses in browsers? Or is there something else I’m missing?
Thanks in advance for any help!
/r/flask
https://redd.it/1kolnus
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Should I learn FastAPI? Why? Doesn’t Django or Flask do the trick?
I’ve been building Python web apps and always used Django or Flask because they felt reliable and well-established. Recently, I stumbled on davia ai — a tool built on FastAPI that I really wanted to try. But to get the most out of it, I realized I needed to learn FastAPI first. Now I’m wondering if it’s worth the switch. If so, what teaching materials do you recommend?
/r/Python
https://redd.it/1kou6lc
I’ve been building Python web apps and always used Django or Flask because they felt reliable and well-established. Recently, I stumbled on davia ai — a tool built on FastAPI that I really wanted to try. But to get the most out of it, I realized I needed to learn FastAPI first. Now I’m wondering if it’s worth the switch. If so, what teaching materials do you recommend?
/r/Python
https://redd.it/1kou6lc
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Is there a module that can dynamically can change all div ids and css ids on each request?
as the title says.
I need that without change all other functions in my flask application.
if it doesn't exist and you just wanna talk bullshit then just don't reply
/r/flask
https://redd.it/1kou68z
as the title says.
I need that without change all other functions in my flask application.
if it doesn't exist and you just wanna talk bullshit then just don't reply
/r/flask
https://redd.it/1kou68z
Reddit
From the flask community on Reddit
Explore this post and more from the flask community