FastAPI is usually the right choice
Digging through the big 3, it feels like FastAPI is going to be the right choice 9/10 times (with the 1 time being if you really want a full-stack all-in-one thing like Django) https://judoscale.com/blog/which-python-framework-is-best
/r/Python
https://redd.it/1ljrsti
Digging through the big 3, it feels like FastAPI is going to be the right choice 9/10 times (with the 1 time being if you really want a full-stack all-in-one thing like Django) https://judoscale.com/blog/which-python-framework-is-best
/r/Python
https://redd.it/1ljrsti
Judoscale
Choosing the Best Python Web Framework
The Python community is lucky enough to have great options to pick from when choosing the right framework. Read on to learn which one is best for your project.
Used Flask to Make a Game Mashup App
Hi, everyone! I made a web app to practice Python and Flask https://gamemashup-production.up.railway.app/use. It combines two games you provide and fuses them together into a new game. It's free, open source, and doesn't collect information. You can check it out as well as the source code.
https://github.com/SodaCatStudio/GameMashup
/r/flask
https://redd.it/1ljt288
Hi, everyone! I made a web app to practice Python and Flask https://gamemashup-production.up.railway.app/use. It combines two games you provide and fuses them together into a new game. It's free, open source, and doesn't collect information. You can check it out as well as the source code.
https://github.com/SodaCatStudio/GameMashup
/r/flask
https://redd.it/1ljt288
docker-pybuild: Embed Dockerfiles directly in your Python scripts
Hey r/Python! I wanted to share a small proof-of-concept I created that lets you build Docker images directly from Python scripts with embedded Dockerfiles.
# What My Project Does
docker-pybuild is a Docker CLI plugin inspired by PEP-723 (which allows you to specify Python version and dependencies in script metadata). It extends this concept to include a complete Dockerfile in your Python script's metadata.
# Target Audience
It's pretty much just a proof-of-concept at this point, but I thought someone might find it handy.
# Comparison
I'm not really aware of any similar projects, but I'd be happy to hear if someone knows of any alternatives.
# Example
# /// script
# requires-python = ">=3.11"
# dependencies =
# "requests<3"
#
# tool.docker
# Dockerfile = """
# FROM python:3.11
# RUN pip install pipx
# WORKDIR /app
# COPY application.py /app
# ENTRYPOINT "pipx", "run", "/app/application.py"
# """
# ///
/r/Python
https://redd.it/1lk3jst
Hey r/Python! I wanted to share a small proof-of-concept I created that lets you build Docker images directly from Python scripts with embedded Dockerfiles.
# What My Project Does
docker-pybuild is a Docker CLI plugin inspired by PEP-723 (which allows you to specify Python version and dependencies in script metadata). It extends this concept to include a complete Dockerfile in your Python script's metadata.
# Target Audience
It's pretty much just a proof-of-concept at this point, but I thought someone might find it handy.
# Comparison
I'm not really aware of any similar projects, but I'd be happy to hear if someone knows of any alternatives.
# Example
# /// script
# requires-python = ">=3.11"
# dependencies =
# "requests<3"
#
# tool.docker
# Dockerfile = """
# FROM python:3.11
# RUN pip install pipx
# WORKDIR /app
# COPY application.py /app
# ENTRYPOINT "pipx", "run", "/app/application.py"
# """
# ///
/r/Python
https://redd.it/1lk3jst
Python Enhancement Proposals (PEPs)
PEP 723 – Inline script metadata | peps.python.org
This PEP specifies a metadata format that can be embedded in single-file Python scripts to assist launchers, IDEs and other external tools which may need to interact with such scripts.
My response to Tim Peters: The Zen of Spite
• There are fifteen inconsistent ways to do anything, and all of them are half-documented.
• If the method isn’t available on the object, try the module, or the class, or both.
• Readability counts - but only after you guess the correct paradigm.
• Special cases aren't special enough to break your pipeline silently.
• Errors should never pass silently - unless you're too lazy to raise them.
• In the face of ambiguity, add a decorator and pretend it’s elegant.
• There should be one - and preferably only one - obvious way to do it. (Except for strings. And sorting. And file IO. And literally everything else.)
• Namespaces are one honking great idea - let’s ruin them with sys.path hacks.
• Simple is better than complex - but complex is what you'll get from `utils.py`.
• Flat is better than nested - unless you're three layers deep in a method chain.
• Now is better than never - especially when writing compatibility layers for Python 2.
• Although never is often better than *right* now - unless you're handling NoneType.
• If the implementation is hard to explain, call it Pythonic and write a blog post.
• If the implementation is easy to explain, rename it three times and
/r/Python
https://redd.it/1lkabe1
• There are fifteen inconsistent ways to do anything, and all of them are half-documented.
• If the method isn’t available on the object, try the module, or the class, or both.
• Readability counts - but only after you guess the correct paradigm.
• Special cases aren't special enough to break your pipeline silently.
• Errors should never pass silently - unless you're too lazy to raise them.
• In the face of ambiguity, add a decorator and pretend it’s elegant.
• There should be one - and preferably only one - obvious way to do it. (Except for strings. And sorting. And file IO. And literally everything else.)
• Namespaces are one honking great idea - let’s ruin them with sys.path hacks.
• Simple is better than complex - but complex is what you'll get from `utils.py`.
• Flat is better than nested - unless you're three layers deep in a method chain.
• Now is better than never - especially when writing compatibility layers for Python 2.
• Although never is often better than *right* now - unless you're handling NoneType.
• If the implementation is hard to explain, call it Pythonic and write a blog post.
• If the implementation is easy to explain, rename it three times and
/r/Python
https://redd.it/1lkabe1
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Switching from Flask to Django — what should I learn beyond the basics?
Hey everyone,
I've previously worked with Flask for backend development and I'm now shifting to Django for a new project. The frontend is built using React, and I'll be connecting it to a Django backend (separate folders).
Due to time constraints, I’m going through a 1-hour Django crash course to get up to speed. I understand the basics of models, views, and routing, but I’m wondering:
>
Specifically, I’ll be handling Firebase Authentication on the frontend, and passing the
Any advice on:
API development best practices in Django?
CORS and handling frontend/backend communication?
Firebase token verification in Django?
How to structure Django apps cleanly for APIs?
Appreciate any tips, gotchas, or resources that helped you when doing a similar stack. 🙌
/r/djangolearning
https://redd.it/1lk4kmg
Hey everyone,
I've previously worked with Flask for backend development and I'm now shifting to Django for a new project. The frontend is built using React, and I'll be connecting it to a Django backend (separate folders).
Due to time constraints, I’m going through a 1-hour Django crash course to get up to speed. I understand the basics of models, views, and routing, but I’m wondering:
>
Specifically, I’ll be handling Firebase Authentication on the frontend, and passing the
idToken to Django for verification and protected routes.Any advice on:
API development best practices in Django?
CORS and handling frontend/backend communication?
Firebase token verification in Django?
How to structure Django apps cleanly for APIs?
Appreciate any tips, gotchas, or resources that helped you when doing a similar stack. 🙌
/r/djangolearning
https://redd.it/1lk4kmg
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Django tip Very Important Consolidate Your Migrations (Squash Migrations)
/r/django
https://redd.it/1lk6ffv
/r/django
https://redd.it/1lk6ffv
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1lklnhr
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1lklnhr
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
🚀 A Beautiful Python GUI Framework with Animations, Theming, State Binding & Live Hot Reload
🔗 GitHub Repo: [WinUp](https://github.com/mebaadwaheed/winup)
**What My Project Does**
**WinUp** is a modern, component-based GUI framework for Python built on PySide6 with:
* A real reactive state system (`state.create`, `bind_to`)
* **Live Hot Reload** (LHR) – instantly updates your UI as you save
* Built-in theming (light/dark/custom)
* Native-feeling UI components
* Built-in animation support
* Optional PySide6/Qt integration for low-level access
No QML, no XML, no subclassing Qt widgets — just clean Python code.
**Target Audience**
* Python developers building desktop tools or internal apps
* Indie hackers, tinkerers, and beginners
* Anyone tired of Tkinter’s ancient look or Qt's verbosity
**Comparison with Other Frameworks**
|Feature|WinUp|Tkinter|PySide6 / PyQt6|Toga|DearPyGui|
|:-|:-|:-|:-|:-|:-|
|Syntax|Declarative|Imperative|Verbose|Declarative|Verbose|
|Animations|Built-in|No|Manual|No|Built-in|
|Theming|Built-in|No|QSS|Basic|Custom|
|State System|Built-in|Manual|Signal-based|Limited|Built-in|
|Live Hot Reload|✅ Yes|❌ No|❌ No|✅ Yes|❌ No|
|Learning Curve|Easy|Easy|Steep|Medium|Medium|
**Example: State Binding with Events**
import winup
from winup import ui
def App():
counter = winup.state.create("counter", 0)
label = ui.Label()
counter.bind_to(label, 'text', lambda c: f"Counter Value: {c}")
def increment():
counter.set(counter.get() + 1)
/r/Python
https://redd.it/1lkwvz9
🔗 GitHub Repo: [WinUp](https://github.com/mebaadwaheed/winup)
**What My Project Does**
**WinUp** is a modern, component-based GUI framework for Python built on PySide6 with:
* A real reactive state system (`state.create`, `bind_to`)
* **Live Hot Reload** (LHR) – instantly updates your UI as you save
* Built-in theming (light/dark/custom)
* Native-feeling UI components
* Built-in animation support
* Optional PySide6/Qt integration for low-level access
No QML, no XML, no subclassing Qt widgets — just clean Python code.
**Target Audience**
* Python developers building desktop tools or internal apps
* Indie hackers, tinkerers, and beginners
* Anyone tired of Tkinter’s ancient look or Qt's verbosity
**Comparison with Other Frameworks**
|Feature|WinUp|Tkinter|PySide6 / PyQt6|Toga|DearPyGui|
|:-|:-|:-|:-|:-|:-|
|Syntax|Declarative|Imperative|Verbose|Declarative|Verbose|
|Animations|Built-in|No|Manual|No|Built-in|
|Theming|Built-in|No|QSS|Basic|Custom|
|State System|Built-in|Manual|Signal-based|Limited|Built-in|
|Live Hot Reload|✅ Yes|❌ No|❌ No|✅ Yes|❌ No|
|Learning Curve|Easy|Easy|Steep|Medium|Medium|
**Example: State Binding with Events**
import winup
from winup import ui
def App():
counter = winup.state.create("counter", 0)
label = ui.Label()
counter.bind_to(label, 'text', lambda c: f"Counter Value: {c}")
def increment():
counter.set(counter.get() + 1)
/r/Python
https://redd.it/1lkwvz9
GitHub
GitHub - mebaadwaheed/winup: The repo for the WinUp Library Project.
The repo for the WinUp Library Project. Contribute to mebaadwaheed/winup development by creating an account on GitHub.
Good Open Source / Good First Issue Repos for Django
Greetings everyone,
So I'm looking forward to keep learning Django but I would totally love to collaborate on projects that aren't made from scratch since I once heard that in the real world we probably won't be building apps from scratch.
I'm seeking if anyone here knows about or has one open source project I could jump in? Maybe like fixing some bugs or adding some featured that haven't been added, at the moment I'm still pursuing my degree and I got one year left so I believe this is my best option for real life experience as well as professional experience in the field, I can still afford to collaborate without getting payed so I would totally aprreciate if you guys know about anything :)
Thank you very much, have a nice day!
/r/django
https://redd.it/1lklmdf
Greetings everyone,
So I'm looking forward to keep learning Django but I would totally love to collaborate on projects that aren't made from scratch since I once heard that in the real world we probably won't be building apps from scratch.
I'm seeking if anyone here knows about or has one open source project I could jump in? Maybe like fixing some bugs or adding some featured that haven't been added, at the moment I'm still pursuing my degree and I got one year left so I believe this is my best option for real life experience as well as professional experience in the field, I can still afford to collaborate without getting payed so I would totally aprreciate if you guys know about anything :)
Thank you very much, have a nice day!
/r/django
https://redd.it/1lklmdf
Reddit
From the django community on Reddit
Explore this post and more from the django community
Flask session not being retrieved properly
Dear flask users,
I have developed (vide-coded) a flask-based [webapp](https://www.sieversstudyhall.com/) to practice German grammar. It is hosted on pythonanywhere.
The code is here: [https://github.com/cbjcamus/Sievers-Study-Hall](https://github.com/cbjcamus/Sievers-Study-Hall)
I don't want to use logins because I'm tired of having to create an account on every website I visit. I'm therefore relying on server-based sessions to store each user's progress.
Here is the behavior I get:
* While a user practice German, the progress is stored correctly.
* While the browser stays opened, the progress is mostly stored from one day to the next.
* /!\\ When one opens a browser, uses the app, closes the browser, and opens the same browser the next day, the progress hasn't been saved.
Concerning the last point, it is the case with every browser I've tried (Chrome, Firefox, Edge, Brave), and for each browser the "third-party cookies" are accepted and the "Delete cookies when the browser is closed" isn't checked.
The behavior I would like to have:
* A user opens a browser, uses the app, closes the browser, and opens the same browser on the same device the next day, the progress has been saved.
* If a user doesn't use the app for three months on the same browser and device, the progress is erased -- timedelta(days=90)
I'm
/r/flask
https://redd.it/1lkvgqg
Dear flask users,
I have developed (vide-coded) a flask-based [webapp](https://www.sieversstudyhall.com/) to practice German grammar. It is hosted on pythonanywhere.
The code is here: [https://github.com/cbjcamus/Sievers-Study-Hall](https://github.com/cbjcamus/Sievers-Study-Hall)
I don't want to use logins because I'm tired of having to create an account on every website I visit. I'm therefore relying on server-based sessions to store each user's progress.
Here is the behavior I get:
* While a user practice German, the progress is stored correctly.
* While the browser stays opened, the progress is mostly stored from one day to the next.
* /!\\ When one opens a browser, uses the app, closes the browser, and opens the same browser the next day, the progress hasn't been saved.
Concerning the last point, it is the case with every browser I've tried (Chrome, Firefox, Edge, Brave), and for each browser the "third-party cookies" are accepted and the "Delete cookies when the browser is closed" isn't checked.
The behavior I would like to have:
* A user opens a browser, uses the app, closes the browser, and opens the same browser on the same device the next day, the progress has been saved.
* If a user doesn't use the app for three months on the same browser and device, the progress is erased -- timedelta(days=90)
I'm
/r/flask
https://redd.it/1lkvgqg
Kajson: Drop-in JSON replacement with Pydantic v2, polymorphism and type preservation
# What My Project Does
Ever spent hours debugging "Object of type X is not JSON serializable"? Yeah, me too. **Kajson** fixes that nonsense: just swap `import json` with `import kajson as json` and watch your Pydantic models, **datetime objects**, enums, and entire class hierarchies serialize like magic.
* **Polymorphism that just works**: Got a `Pet` with an `Animal` field? Kajson remembers if it's a `Dog` or `Cat` when you deserialize. No discriminators, no unions, no BS.
* **Your existing code stays untouched**: Same `dumps()` and `loads()` you know and love
* **Built for real systems**: Full Pydantic v2 validation on the way back in - because production data is messy
# Target Audience
**This is for builders shipping real stuff**: FastAPI teams, microservice architects, anyone who's tired of writing yet another custom encoder.
**AI/LLM developers doing structured generation**: When your LLM spits out JSON conforming to dynamically created Pydantic schemas, Kajson handles the serialization/deserialization dance across your distributed workers. No more manually reconstructing BaseModels from tool calls.
**Already battle-tested**: We built this at Pipelex because our AI workflow engine needed to serialize complex model hierarchies across distributed workers. If it can handle our chaos, it can handle yours.
# Comparison
**stdlib json**: Forces you to write custom encoders for
/r/Python
https://redd.it/1ll1djh
# What My Project Does
Ever spent hours debugging "Object of type X is not JSON serializable"? Yeah, me too. **Kajson** fixes that nonsense: just swap `import json` with `import kajson as json` and watch your Pydantic models, **datetime objects**, enums, and entire class hierarchies serialize like magic.
* **Polymorphism that just works**: Got a `Pet` with an `Animal` field? Kajson remembers if it's a `Dog` or `Cat` when you deserialize. No discriminators, no unions, no BS.
* **Your existing code stays untouched**: Same `dumps()` and `loads()` you know and love
* **Built for real systems**: Full Pydantic v2 validation on the way back in - because production data is messy
# Target Audience
**This is for builders shipping real stuff**: FastAPI teams, microservice architects, anyone who's tired of writing yet another custom encoder.
**AI/LLM developers doing structured generation**: When your LLM spits out JSON conforming to dynamically created Pydantic schemas, Kajson handles the serialization/deserialization dance across your distributed workers. No more manually reconstructing BaseModels from tool calls.
**Already battle-tested**: We built this at Pipelex because our AI workflow engine needed to serialize complex model hierarchies across distributed workers. If it can handle our chaos, it can handle yours.
# Comparison
**stdlib json**: Forces you to write custom encoders for
/r/Python
https://redd.it/1ll1djh
Reddit
From the Python community on Reddit: Kajson: Drop-in JSON replacement with Pydantic v2, polymorphism and type preservation
Explore this post and more from the Python community
Is there really anything better than flask for rapid development?
I love how easy it is to get started with flask. Spin up a new venv, install flask, write up your code in an app.py file, flask run and you're off to the races. And it is just so simple to write what you want in python from there.
Full-stack frameworks like laravel, django and rails do some of the heavy lifting for you but it does take a little bit of digging to know what's going on and how to use them.
AI is also way better at helping and successfully with my flask apps than with anything else I have used. Laravel and rails have also had some non-trivial changes in the past year like new laravel starter kits or a new rails auth system to replace devise, that I guess LLMs haven't gotten trained on yet, whereas nothing all that big has changed in the flask ecosystem for years, so they know what you're working with.
Any thoughts? Or have I just gotten so used to the developer experience that flask just seems easiest to me?
/r/flask
https://redd.it/1ll9fzz
I love how easy it is to get started with flask. Spin up a new venv, install flask, write up your code in an app.py file, flask run and you're off to the races. And it is just so simple to write what you want in python from there.
Full-stack frameworks like laravel, django and rails do some of the heavy lifting for you but it does take a little bit of digging to know what's going on and how to use them.
AI is also way better at helping and successfully with my flask apps than with anything else I have used. Laravel and rails have also had some non-trivial changes in the past year like new laravel starter kits or a new rails auth system to replace devise, that I guess LLMs haven't gotten trained on yet, whereas nothing all that big has changed in the flask ecosystem for years, so they know what you're working with.
Any thoughts? Or have I just gotten so used to the developer experience that flask just seems easiest to me?
/r/flask
https://redd.it/1ll9fzz
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1llfp2q
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1llfp2q
Redditinc
Reddit Rules
Reddit Rules - Reddit
[R] You can just predict the optimum (aka in-context Bayesian optimization)
Hi all,
I wanted to share a blog post about our recent AISTATS 2025 paper on using Transformers for black-box optimization, among other things.
TL;DR: We train a Transformer on millions of synthetically generated (function, optimum) pairs. The trained model can then predict the optimum of a new, unseen function in a single forward pass. The blog post focuses on the key trick: how to efficiently generate this massive dataset.
* **Blog post:** [https://lacerbi.github.io/blog/2025/just-predict-the-optimum/](https://lacerbi.github.io/blog/2025/just-predict-the-optimum/)
* **Paper:** Chang et al. (AISTATS, 2025) [https://arxiv.org/abs/2410.15320](https://arxiv.org/abs/2410.15320)
* **Website:** [https://acerbilab.github.io/amortized-conditioning-engine/](https://acerbilab.github.io/amortized-conditioning-engine/)
Many of us use Bayesian Optimization (BO) or similar methods for expensive black-box optimization tasks, like hyperparameter tuning. These are iterative, sequential processes. We had an idea inspired by the power of in-context learning shown by transformer-based meta-learning models such as Transformer Neural Processes (TNPs) and Prior-Fitted Networks (PFNs): what if we could frame optimization (as well as several other machine learning tasks) as a massive prediction problem?
For the optimization task, we developed a method where a Transformer is pre-trained to learn an implicit "prior" over functions. It observes a few points from a new target function and directly outputs its prediction as a distribution over the location and value of the optimum. This approach is also known as "amortized inference"
/r/MachineLearning
https://redd.it/1ll69g0
Hi all,
I wanted to share a blog post about our recent AISTATS 2025 paper on using Transformers for black-box optimization, among other things.
TL;DR: We train a Transformer on millions of synthetically generated (function, optimum) pairs. The trained model can then predict the optimum of a new, unseen function in a single forward pass. The blog post focuses on the key trick: how to efficiently generate this massive dataset.
* **Blog post:** [https://lacerbi.github.io/blog/2025/just-predict-the-optimum/](https://lacerbi.github.io/blog/2025/just-predict-the-optimum/)
* **Paper:** Chang et al. (AISTATS, 2025) [https://arxiv.org/abs/2410.15320](https://arxiv.org/abs/2410.15320)
* **Website:** [https://acerbilab.github.io/amortized-conditioning-engine/](https://acerbilab.github.io/amortized-conditioning-engine/)
Many of us use Bayesian Optimization (BO) or similar methods for expensive black-box optimization tasks, like hyperparameter tuning. These are iterative, sequential processes. We had an idea inspired by the power of in-context learning shown by transformer-based meta-learning models such as Transformer Neural Processes (TNPs) and Prior-Fitted Networks (PFNs): what if we could frame optimization (as well as several other machine learning tasks) as a massive prediction problem?
For the optimization task, we developed a method where a Transformer is pre-trained to learn an implicit "prior" over functions. It observes a few points from a new target function and directly outputs its prediction as a distribution over the location and value of the optimum. This approach is also known as "amortized inference"
/r/MachineLearning
https://redd.it/1ll69g0
lacerbi.github.io
You can just predict the optimum | Luigi Acerbi
instant Bayesian optimization! (kind of)
Sick of dating apps.
i have been really frustrated with dating apps and the way they work and mostly just dont.
i was so fed up with stupid subscriptions, no matches, ancient profiles, ghosting, showing me people that we have nothing in common. it has been like this forever.
can nobody make a simple dating app? what is so hard about it? in fact how hard can it be?
ghosters? ban them. match collectors? ban them, just limit the matches. frequent unmatchers? ban them. show people that have matching interest with you? make people rate interactions and sort the stack by merit.
right? right!
so i built a very simple dating app and i need testers and users to get it of the ground: https://sickra pythonanywhere.com
( we will move to sickra.com eventually.
but this is a test site. )
the stack page will go online tomorrow thats when you can start swiping, but you can sign up today.
i can do it better and i will prove its not hard either.
stack:
back: flask, flask-login, db sqlite,
front end: html, css, bootstrap and a sprinkle of js to make the magic happen.
/r/flask
https://redd.it/1ll75cz
i have been really frustrated with dating apps and the way they work and mostly just dont.
i was so fed up with stupid subscriptions, no matches, ancient profiles, ghosting, showing me people that we have nothing in common. it has been like this forever.
can nobody make a simple dating app? what is so hard about it? in fact how hard can it be?
ghosters? ban them. match collectors? ban them, just limit the matches. frequent unmatchers? ban them. show people that have matching interest with you? make people rate interactions and sort the stack by merit.
right? right!
so i built a very simple dating app and i need testers and users to get it of the ground: https://sickra pythonanywhere.com
( we will move to sickra.com eventually.
but this is a test site. )
the stack page will go online tomorrow thats when you can start swiping, but you can sign up today.
i can do it better and i will prove its not hard either.
stack:
back: flask, flask-login, db sqlite,
front end: html, css, bootstrap and a sprinkle of js to make the magic happen.
/r/flask
https://redd.it/1ll75cz
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
select ForeignKey
hola
tengo este código y no logro saber que esta mal
<form enctype="multipart/form-data" method="POST">
{% csrftoken %}
{# Incluir los campos visibles #}
{% for campo in formulario %}
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon1">{{campo.label}}</span>
<input type="{{campo.field.widget.inputtype}}"
class="form-control"
name="{{campo.name}}"
id=""
aria-describedby="helpId"
placeholder=""
value="{{campo.value | default:''}}"/>
</div>
{% endfor %}
</form>
el codigo funciona pero el capo fecha no me lo toma con date
y el select que esta asociado con un ForeignKey no me muestra la lista de los valores con el campo asociado
Gracias
/r/django
https://redd.it/1llhsa7
hola
tengo este código y no logro saber que esta mal
<form enctype="multipart/form-data" method="POST">
{% csrftoken %}
{# Incluir los campos visibles #}
{% for campo in formulario %}
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon1">{{campo.label}}</span>
<input type="{{campo.field.widget.inputtype}}"
class="form-control"
name="{{campo.name}}"
id=""
aria-describedby="helpId"
placeholder=""
value="{{campo.value | default:''}}"/>
</div>
{% endfor %}
</form>
el codigo funciona pero el capo fecha no me lo toma con date
y el select que esta asociado con un ForeignKey no me muestra la lista de los valores con el campo asociado
Gracias
/r/django
https://redd.it/1llhsa7
Reddit
From the django community on Reddit
Explore this post and more from the django community
Kenneth Reitz (Request library creator) current situation
Kenneth Reitz, known by creating dozens of python open source libraries and tools, some of them like requests library (top 5 still nowadays) and Pipenv (still being used in millions of CI-CD pipelines)
He posted yesterday in LinkedIn (also in X):
>If anyone wants to help by sending me some dollars, that would be tremendously helpful. My checking account is at $0.56. Currently applying for disability, so unable to work due to this. Thanks 🙏 if you wish to help! [venmo.com/u/KennethReitz](http://venmo.com/u/KennethReitz)
* [https://www.linkedin.com/posts/kennethreitz\_venmo-kenneth-reitz-activity-7343376172136771586-n\_Pz](https://www.linkedin.com/posts/kennethreitz_venmo-kenneth-reitz-activity-7343376172136771586-n_Pz)
* [https://x.com/kennethreitz42/status/1937615578182660393](https://x.com/kennethreitz42/status/1937615578182660393)
It can also be seen in his posts history that been looking for a job for about a year:
* [https://www.linkedin.com/in/kennethreitz/recent-activity/all/](https://www.linkedin.com/in/kennethreitz/recent-activity/all/)
Leaving aside the aspects already known in the Python community about his mental health issues, and some controversy, I'm sharing this, thinking that PSF and the whole Python community knows how valuable have been his contributions and cannot be leaved alone in this hard situation he is facing right now.
I encourage everyone that can contribute with any amount that can help him get through this.
References:
* Family: [https://kennethreitz.org/family](https://kennethreitz.org/family)
* His values page on his website: [https://kennethreitz.org/values](https://kennethreitz.org/values)
* His posts on Mental health issues (also notes in the LinkedIn post comments): [https://kennethreitz.org/mental-health](https://kennethreitz.org/mental-health)
* 12 years ago, what ironic post here (looks like he's NOT a millionaire,
/r/Python
https://redd.it/1lkwhk0
Kenneth Reitz, known by creating dozens of python open source libraries and tools, some of them like requests library (top 5 still nowadays) and Pipenv (still being used in millions of CI-CD pipelines)
He posted yesterday in LinkedIn (also in X):
>If anyone wants to help by sending me some dollars, that would be tremendously helpful. My checking account is at $0.56. Currently applying for disability, so unable to work due to this. Thanks 🙏 if you wish to help! [venmo.com/u/KennethReitz](http://venmo.com/u/KennethReitz)
* [https://www.linkedin.com/posts/kennethreitz\_venmo-kenneth-reitz-activity-7343376172136771586-n\_Pz](https://www.linkedin.com/posts/kennethreitz_venmo-kenneth-reitz-activity-7343376172136771586-n_Pz)
* [https://x.com/kennethreitz42/status/1937615578182660393](https://x.com/kennethreitz42/status/1937615578182660393)
It can also be seen in his posts history that been looking for a job for about a year:
* [https://www.linkedin.com/in/kennethreitz/recent-activity/all/](https://www.linkedin.com/in/kennethreitz/recent-activity/all/)
Leaving aside the aspects already known in the Python community about his mental health issues, and some controversy, I'm sharing this, thinking that PSF and the whole Python community knows how valuable have been his contributions and cannot be leaved alone in this hard situation he is facing right now.
I encourage everyone that can contribute with any amount that can help him get through this.
References:
* Family: [https://kennethreitz.org/family](https://kennethreitz.org/family)
* His values page on his website: [https://kennethreitz.org/values](https://kennethreitz.org/values)
* His posts on Mental health issues (also notes in the LinkedIn post comments): [https://kennethreitz.org/mental-health](https://kennethreitz.org/mental-health)
* 12 years ago, what ironic post here (looks like he's NOT a millionaire,
/r/Python
https://redd.it/1lkwhk0
ai-rulez: autogenerate rule files (.cursorrules, CLAUDE.md etc.) from yaml
**GitHub:** https://github.com/Goldziher/ai-rulez
## The Problem
If you're using multiple AI coding tools (Claude, Cursor, Windsurf, etc.), you've probably noticed each one requires its configuration file - `.cursorrules`, `.windsurfrules`, `CLAUDE.md`, and so on. Maintaining consistent coding standards across all these tools can be frustrating.
## Solution: Write Once, Generate for Any Tool
AI-Rulez lets you define your coding rules once in a structured YAML file and automatically generates configuration files for **any AI tool**, including current ones and future ones. It's completely **platform-agnostic** with a powerful templating system.
It's very fast, written in Go, and it has wrappers for Python (pip) and Node (npm).
## Configuration
All configuration is done using `ai_rulez.yaml` (.ai_rulez.yaml also supported):
```yaml
metadata:
name: "My Python Project Rules"
version: "1.0.0"
outputs:
- file: "CLAUDE.md"
- file: ".cursorrules"
- file: ".windsurfrules"
- file: "custom-ai-tool.txt" # Any format you need!
rules:
- name: "Code Style"
priority: 10
content: |
- Use Python 3.11+ features
- Follow PEP 8 strictly
- Use type hints everywhere
- name: "Testing"
priority: 5
content:
/r/Python
https://redd.it/1llnlqa
**GitHub:** https://github.com/Goldziher/ai-rulez
## The Problem
If you're using multiple AI coding tools (Claude, Cursor, Windsurf, etc.), you've probably noticed each one requires its configuration file - `.cursorrules`, `.windsurfrules`, `CLAUDE.md`, and so on. Maintaining consistent coding standards across all these tools can be frustrating.
## Solution: Write Once, Generate for Any Tool
AI-Rulez lets you define your coding rules once in a structured YAML file and automatically generates configuration files for **any AI tool**, including current ones and future ones. It's completely **platform-agnostic** with a powerful templating system.
It's very fast, written in Go, and it has wrappers for Python (pip) and Node (npm).
## Configuration
All configuration is done using `ai_rulez.yaml` (.ai_rulez.yaml also supported):
```yaml
metadata:
name: "My Python Project Rules"
version: "1.0.0"
outputs:
- file: "CLAUDE.md"
- file: ".cursorrules"
- file: ".windsurfrules"
- file: "custom-ai-tool.txt" # Any format you need!
rules:
- name: "Code Style"
priority: 10
content: |
- Use Python 3.11+ features
- Follow PEP 8 strictly
- Use type hints everywhere
- name: "Testing"
priority: 5
content:
/r/Python
https://redd.it/1llnlqa
GitHub
GitHub - Goldziher/ai-rulez: The universal configuration manager for your AI assistants. Define context once in a single ai-rulez.yml…
The universal configuration manager for your AI assistants. Define context once in a single ai-rulez.yml file, and use the CLI to generate synchronized instructions for Claude, Cursor, Copilot, and...
JurisJs: An open invitation to try new client framework
JurisJS is the first web framework to implement non-blocking rendering pipeline, making 3ms client side render impossibly double even for asynchronous heavy clients requirement. It can handle all your asynchronous requests in parallel allowing other fast request to renders quickly.
For Django backend, developers can choose between two modes solution:
1: Static HTML + JurisJs enhance() API,
2: REST Backend + JurisJs Full Component System in frontend.
It's a good alternative for React if you don't want build. to alpine if you want debuggable cross element reactivity.
JurisJS is designed for all developer javascript expertise.
* Features:
* - Temporal Independent
* - Automatic deep call stack branch aware dependency detection
* - Smart Promise Handling
* - Component lazy compilation
* - Non-Blocking Rendering
* - Global Non-Reactive State Management
*
* Performance:
* - Sub 3ms render on simple apps
* - Sub 10ms render on complex or large apps
* - Sub 20ms render on very complex or large apps
GitHub: https://github.com/jurisjs/juris
Website: https://jurisjs.com/
NPM: https://www.npmjs.com/package/juris
Codepen: https://codepen.io/jurisauthor
Online Testing: https://jurisjs.com/tests/juris_pure_test_interface.html
/r/django
https://redd.it/1llqcwn
JurisJS is the first web framework to implement non-blocking rendering pipeline, making 3ms client side render impossibly double even for asynchronous heavy clients requirement. It can handle all your asynchronous requests in parallel allowing other fast request to renders quickly.
For Django backend, developers can choose between two modes solution:
1: Static HTML + JurisJs enhance() API,
2: REST Backend + JurisJs Full Component System in frontend.
It's a good alternative for React if you don't want build. to alpine if you want debuggable cross element reactivity.
JurisJS is designed for all developer javascript expertise.
* Features:
* - Temporal Independent
* - Automatic deep call stack branch aware dependency detection
* - Smart Promise Handling
* - Component lazy compilation
* - Non-Blocking Rendering
* - Global Non-Reactive State Management
*
* Performance:
* - Sub 3ms render on simple apps
* - Sub 10ms render on complex or large apps
* - Sub 20ms render on very complex or large apps
GitHub: https://github.com/jurisjs/juris
Website: https://jurisjs.com/
NPM: https://www.npmjs.com/package/juris
Codepen: https://codepen.io/jurisauthor
Online Testing: https://jurisjs.com/tests/juris_pure_test_interface.html
/r/django
https://redd.it/1llqcwn
GitHub
GitHub - jurisjs/juris: JURIS is JavaScript Unified Reactive Interface Solution, the first and only Non-Blocking Reactive Object…
JURIS is JavaScript Unified Reactive Interface Solution, the first and only Non-Blocking Reactive Object Framework for the web - jurisjs/juris