Just implemented my honeypots. Wish me luck!
I certainly hope Bingbot and Googlebot follow my robots.txt file 😬
/r/flask
https://redd.it/1jdsxhf
I certainly hope Bingbot and Googlebot follow my robots.txt file 😬
/r/flask
https://redd.it/1jdsxhf
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Flask Hosting: Cold starts and restarts
I built a small site with Flask and hosted it on Render’s free tier.
Initially, I had it on PythonAnywhere, but they didn’t seem to offer a way to add a custom domain on the free plan—or at least, it wasn’t straightforward.
Migrating to Render was easy, and setting up the domain was simple. But soon, I ran into two major problems.
Data Loss
I would save data to my database through the website, only to come back hours later and find it gone. I thought it was an issue with my commits and spent time troubleshooting, only to realize that Render frequently restarts services.
Why did this affect my database?
I was using SQLite. Since SQLite stores data in a file on the web service itself, every time the service restarted, it reverted to the last deployed state, wiping out any new data.
I eventually migrated to Postgres with Neon to fix this.
Cold Starts
Since my site only gets 3–4 visitors a day, it often sits idle. Naturally, I expected it to be put to sleep occasionally. But the real problem? It takes almost a full minute to wake up.
I don’t know about you, but if I visited a site called wisefool.xyz and it took that long
/r/flask
https://redd.it/1jd5t5o
I built a small site with Flask and hosted it on Render’s free tier.
Initially, I had it on PythonAnywhere, but they didn’t seem to offer a way to add a custom domain on the free plan—or at least, it wasn’t straightforward.
Migrating to Render was easy, and setting up the domain was simple. But soon, I ran into two major problems.
Data Loss
I would save data to my database through the website, only to come back hours later and find it gone. I thought it was an issue with my commits and spent time troubleshooting, only to realize that Render frequently restarts services.
Why did this affect my database?
I was using SQLite. Since SQLite stores data in a file on the web service itself, every time the service restarted, it reverted to the last deployed state, wiping out any new data.
I eventually migrated to Postgres with Neon to fix this.
Cold Starts
Since my site only gets 3–4 visitors a day, it often sits idle. Naturally, I expected it to be put to sleep occasionally. But the real problem? It takes almost a full minute to wake up.
I don’t know about you, but if I visited a site called wisefool.xyz and it took that long
/r/flask
https://redd.it/1jd5t5o
Is there something better than exceptions?
Ok, let's say it's a follow-up on this 11-year-old post
https://www.reddit.com/r/Python/comments/257x8f/honest\_question\_why\_are\_exceptions\_encouraged\_in/
Disclaimer: I'm relatively more experienced with Rust than Python, so here's that. But I genuinely want to learn the best practices of Python.
My background is a mental model of errors I have in mind.
There are two types of errors: environment response and programmer's mistake.
For example, parsing an input from an external source and getting the wrong data is the environment's response. You *will* get the wrong data, you should handle it.
Getting an n-th element from a list which doesn't have that many elements is *probably* a programmer's mistake, and because you can't account for every mistake, you should just let it crash.
Now, if we take different programming languages, let's say C or Go, you have an error code situation for that.
In Go, if a function can return an error (environment response), it returns "err, val" and you're expected to handle the error with "if err != nil".
If it's a programmer's mistake, it just panics.
In C, it's complicated, but most stdlib functions return error code and you're expected to check if it's not zero.
And their handling
/r/Python
https://redd.it/1jf3p1y
Ok, let's say it's a follow-up on this 11-year-old post
https://www.reddit.com/r/Python/comments/257x8f/honest\_question\_why\_are\_exceptions\_encouraged\_in/
Disclaimer: I'm relatively more experienced with Rust than Python, so here's that. But I genuinely want to learn the best practices of Python.
My background is a mental model of errors I have in mind.
There are two types of errors: environment response and programmer's mistake.
For example, parsing an input from an external source and getting the wrong data is the environment's response. You *will* get the wrong data, you should handle it.
Getting an n-th element from a list which doesn't have that many elements is *probably* a programmer's mistake, and because you can't account for every mistake, you should just let it crash.
Now, if we take different programming languages, let's say C or Go, you have an error code situation for that.
In Go, if a function can return an error (environment response), it returns "err, val" and you're expected to handle the error with "if err != nil".
If it's a programmer's mistake, it just panics.
In C, it's complicated, but most stdlib functions return error code and you're expected to check if it's not zero.
And their handling
/r/Python
https://redd.it/1jf3p1y
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Problema na View ou no HTML?
Fala galera, preciso de ajuda num projeto da faculdade. Criei uma view (nome da view - app) caso o usuário baba esteja logado apareça as infos do responsável e vice-versa;
Até então ok... as informações aparecem nos cards etc, mas ao clicar no botão de "Ver Perfil" o modal que abre é sempre do primeiro card; Alguem consegue me ajudar com isso?
HTML:
<div class="container">
{% if tipo_usuario == "baba" %}
<h5 class="mb-4">{{ usuarios|length }} Responsáveis disponíveis</h5>
{% else %}
<h5 class="mb-4">{{ usuarios|length }} Babás disponíveis</h5>
{% endif %}
<div class="row row-cols-1 row-cols-md-2 g-4">
{% for usuario in usuarios %}
<div class="col">
<div class="card h-100 d-flex flex-row shadow-lg">
/r/djangolearning
https://redd.it/1jeoepv
Fala galera, preciso de ajuda num projeto da faculdade. Criei uma view (nome da view - app) caso o usuário baba esteja logado apareça as infos do responsável e vice-versa;
Até então ok... as informações aparecem nos cards etc, mas ao clicar no botão de "Ver Perfil" o modal que abre é sempre do primeiro card; Alguem consegue me ajudar com isso?
HTML:
<div class="container">
{% if tipo_usuario == "baba" %}
<h5 class="mb-4">{{ usuarios|length }} Responsáveis disponíveis</h5>
{% else %}
<h5 class="mb-4">{{ usuarios|length }} Babás disponíveis</h5>
{% endif %}
<div class="row row-cols-1 row-cols-md-2 g-4">
{% for usuario in usuarios %}
<div class="col">
<div class="card h-100 d-flex flex-row shadow-lg">
/r/djangolearning
https://redd.it/1jeoepv
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Any good Python resume projects that AREN'T machine learning?
I'm seeking my first internship and i wanna make a project that showcases my python skills. I tried to get into machine learning using Andrew Ng's course but i wasn't really enjoying it at all i don't think it's for me, but I might pick it up again in the future.
So what are some good projects that recruiters/employers like to see? I won't be aiming for ML/data roles, at least for now
Edit: i have a couple fullstack apps with javascript, so im just tryna diversify my portfolio
/r/Python
https://redd.it/1jf4ce2
I'm seeking my first internship and i wanna make a project that showcases my python skills. I tried to get into machine learning using Andrew Ng's course but i wasn't really enjoying it at all i don't think it's for me, but I might pick it up again in the future.
So what are some good projects that recruiters/employers like to see? I won't be aiming for ML/data roles, at least for now
Edit: i have a couple fullstack apps with javascript, so im just tryna diversify my portfolio
/r/Python
https://redd.it/1jf4ce2
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Django 5.2 release candidate 1 released
https://www.djangoproject.com/weblog/2025/mar/19/django-52-rc1/
/r/django
https://redd.it/1jeuu38
https://www.djangoproject.com/weblog/2025/mar/19/django-52-rc1/
/r/django
https://redd.it/1jeuu38
Django Project
Django 5.2 release candidate 1 released
Posted by Sarah Boyce on March 19, 2025
A Feature-rich Flask Web Application Template 🐍
Hi,
I made a Flask starter template to save time setting up new projects. It includes:
✅ A blueprint-based structure for better organization
✅ GitHub Actions for testing & linting
✅ Makefile and Poetry for managing the development workflow (testing, linting, database migrations, containerization, etc.)
✅ Comes with lots of useful Flask extensions already installed and ready to use (SQLAlchemy, Login, WTF, Admin, Caching, etc.)
🔗 GitHub: https://github.com/habedi/template-web-app-flask
Let me know what you think! 🚀
/r/flask
https://redd.it/1jf98hk
Hi,
I made a Flask starter template to save time setting up new projects. It includes:
✅ A blueprint-based structure for better organization
✅ GitHub Actions for testing & linting
✅ Makefile and Poetry for managing the development workflow (testing, linting, database migrations, containerization, etc.)
✅ Comes with lots of useful Flask extensions already installed and ready to use (SQLAlchemy, Login, WTF, Admin, Caching, etc.)
🔗 GitHub: https://github.com/habedi/template-web-app-flask
Let me know what you think! 🚀
/r/flask
https://redd.it/1jf98hk
GitHub
GitHub - habedi/template-web-app-flask: A feature-rich Flask web application template 🐍
A feature-rich Flask web application template 🐍. Contribute to habedi/template-web-app-flask development by creating an account on GitHub.
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/1jfbrhk
# 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/1jfbrhk
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
A Feature-rich Flask Web Application Template
What My Project Does
I made a Flask starter template to save time setting up new projects. It includes:
\- A blueprint-based structure for better organization
\- GitHub Actions for testing & lining
\- Makefile and Poetry for managing the development workflow (testing, linting, database migrations, containerization, etc.)
\- Comes with lots of useful Flask extensions already installed and ready to use (SQLAlchemy, Login, WTF, Admin, Caching, etc.)
GitHub: https://github.com/habedi/template-web-app-flask
Let me know what you think!
/r/Python
https://redd.it/1jf9ovo
What My Project Does
I made a Flask starter template to save time setting up new projects. It includes:
\- A blueprint-based structure for better organization
\- GitHub Actions for testing & lining
\- Makefile and Poetry for managing the development workflow (testing, linting, database migrations, containerization, etc.)
\- Comes with lots of useful Flask extensions already installed and ready to use (SQLAlchemy, Login, WTF, Admin, Caching, etc.)
GitHub: https://github.com/habedi/template-web-app-flask
Let me know what you think!
/r/Python
https://redd.it/1jf9ovo
GitHub
GitHub - habedi/template-web-app-flask: A feature-rich Flask web application template 🐍
A feature-rich Flask web application template 🐍. Contribute to habedi/template-web-app-flask development by creating an account on GitHub.
Playa PDF: A strong pdfminer successor
Hi there fellas,
I wanna intro you to a great library - not one of mine, but one which I feel deserves some love and stars.
The library in questions is PLAYA which stands for "Parallel and/or LAzY Analyzer for PDF".
What is this?
This library is similar in scope to pdfminer and its fork pdfminer.six - long-established libraries for manipulating and extracting data from PDF files.
It is partially based on pdfminer.six and includes code from it - but it substantially improves on it in multiple ways.
1. It handles a broader range of PDFs and PDF issues, being very close to the (horrible) specification. For example, the author of the library (dhaines) has recently added an enormous test suite from PDF.js (one of the more ancient libraries in this space), which includes a whole gamut of weird PDFs it can handle.
2. It's much faster - well, as far as Python goes, but it is faster than the other Python libs by a factor of at least two, if not three, and not only when parallelizing.
3. complete metadata extraction - this part is what got me into this since I am integrating this with Kreuzberg now (a library of mine, which you
/r/Python
https://redd.it/1jfk466
Hi there fellas,
I wanna intro you to a great library - not one of mine, but one which I feel deserves some love and stars.
The library in questions is PLAYA which stands for "Parallel and/or LAzY Analyzer for PDF".
What is this?
This library is similar in scope to pdfminer and its fork pdfminer.six - long-established libraries for manipulating and extracting data from PDF files.
It is partially based on pdfminer.six and includes code from it - but it substantially improves on it in multiple ways.
1. It handles a broader range of PDFs and PDF issues, being very close to the (horrible) specification. For example, the author of the library (dhaines) has recently added an enormous test suite from PDF.js (one of the more ancient libraries in this space), which includes a whole gamut of weird PDFs it can handle.
2. It's much faster - well, as far as Python goes, but it is faster than the other Python libs by a factor of at least two, if not three, and not only when parallelizing.
3. complete metadata extraction - this part is what got me into this since I am integrating this with Kreuzberg now (a library of mine, which you
/r/Python
https://redd.it/1jfk466
GitHub
GitHub - dhdaines/playa: Parallel and LAzY Analyzer for PDFs 🏖️
Parallel and LAzY Analyzer for PDFs 🏖️. Contribute to dhdaines/playa development by creating an account on GitHub.
Interactive Python Learning Series: From Numbers to Exceptions
Hey Python folks,
I wanted to share a project I've been working on, creating interactive Python tutorials — series of Python fundamentals notebooks in our marimo-learn repository.
What This Project Does: We've built tutorials covering the Python journey from basics to more complex topics. The notebooks are reactive — change code in one place and see updates ripple through in real-time, which makes learning way more intuitive. The content covers Python fundamentals (data types, strings, collections) and builds up to functions, modules, and exception handling. What makes these different is that they're fully interactive and run natively in your browser (thanks to WASM & Pyodide).
Target Audience: Python learners and teachers who prefer hands-on experimentation over passive reading; devs who want to explore Python concepts through an interactive medium rather than static documentation.
Comparison to Alternatives: Unlike static tutorials or videos, these notebooks combine explanation, code, and output in a reactive environment. When you modify code in one cell, all dependent cells automatically update, showing how concepts interconnect.
Source Code: All notebooks are available at /python folder, organized in an appropriate progression (in terms of topics).
We're also looking for Python enthusiasts to contribute additional specialized tutorials. If you're interested, check out our GitHub repository for
/r/Python
https://redd.it/1jfjmf3
Hey Python folks,
I wanted to share a project I've been working on, creating interactive Python tutorials — series of Python fundamentals notebooks in our marimo-learn repository.
What This Project Does: We've built tutorials covering the Python journey from basics to more complex topics. The notebooks are reactive — change code in one place and see updates ripple through in real-time, which makes learning way more intuitive. The content covers Python fundamentals (data types, strings, collections) and builds up to functions, modules, and exception handling. What makes these different is that they're fully interactive and run natively in your browser (thanks to WASM & Pyodide).
Target Audience: Python learners and teachers who prefer hands-on experimentation over passive reading; devs who want to explore Python concepts through an interactive medium rather than static documentation.
Comparison to Alternatives: Unlike static tutorials or videos, these notebooks combine explanation, code, and output in a reactive environment. When you modify code in one cell, all dependent cells automatically update, showing how concepts interconnect.
Source Code: All notebooks are available at /python folder, organized in an appropriate progression (in terms of topics).
We're also looking for Python enthusiasts to contribute additional specialized tutorials. If you're interested, check out our GitHub repository for
/r/Python
https://redd.it/1jfjmf3
GitHub
GitHub - marimo-team/learn: 📚 A curated collection of marimo notebooks for education.
📚 A curated collection of marimo notebooks for education. - marimo-team/learn
AutoML , what are your thoughts about it wanted to learn more about the same
Recently I found interesting libraries called autoML libraries now that I know that they have for a long time and require heavy gpus.
Are they actually used behind the scenes in companies or is autoML such as autosklearn is dead ?
/r/Python
https://redd.it/1jf1r1a
Recently I found interesting libraries called autoML libraries now that I know that they have for a long time and require heavy gpus.
Are they actually used behind the scenes in companies or is autoML such as autosklearn is dead ?
/r/Python
https://redd.it/1jf1r1a
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Problem with template form
Hello all, working on a learning project where I am trying to create an add user form. The form contains a select element that pulls its options from a database table that holds all of the "tracks" that are available. The intent is that the Track.trackName will be passed with the POST request. However, all that gets passed is the first word of Track.trackName....How am I being dumb? This is the relevant code:
\--Part of template--
<form action="./addLearner" method="POST" id="addLearner">
{% csrf_token %}
<label for="fname">First Name: </label><input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last Name: </label><input type="text" id="lname" name="lname"><br><br>
<label for="empID">Employee ID#: </label><input type="text" id="empID" name="empID"><br><br>
</form>
<label for="tracks">Learning Track: </label>
<select name="tracks" id="tracks" form="addLearner">
/r/djangolearning
https://redd.it/1jfcl4y
Hello all, working on a learning project where I am trying to create an add user form. The form contains a select element that pulls its options from a database table that holds all of the "tracks" that are available. The intent is that the Track.trackName will be passed with the POST request. However, all that gets passed is the first word of Track.trackName....How am I being dumb? This is the relevant code:
\--Part of template--
<form action="./addLearner" method="POST" id="addLearner">
{% csrf_token %}
<label for="fname">First Name: </label><input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last Name: </label><input type="text" id="lname" name="lname"><br><br>
<label for="empID">Employee ID#: </label><input type="text" id="empID" name="empID"><br><br>
</form>
<label for="tracks">Learning Track: </label>
<select name="tracks" id="tracks" form="addLearner">
/r/djangolearning
https://redd.it/1jfcl4y
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Looking for Feedback: HTMX + Django Package
I posted about this package a while ago, but at that point, it was still early in development, and the documentation was lacking. Since then, it has matured a lot, and the documentation has been completely restructured and improved. Additionally, I’ve created a demo site so you can see the package in action with a basic list page featuring CRUD operations (link below).
The core idea of the package (explained in more detail in the docs) is to provide quasi-Django CBV-style views, called hx-requests, which HTMX requests are routed to. This approach separates HTMX-specific logic from your main views by providing dedicated hx-requests to handle them, but at the same time these hx-requests have access to the view’s context, eliminating the need for logic duplication.
There are also other useful features, such as:
* Returning template blocks easily from an hx-request
* Built-in support for Django messages, now with async capabilities
* Integrated modal handling
It’s difficult to summarize everything here, so I’d love for you to check out the demo and documentation and share your feedback!
Demo: [https://hx-requests-demo.com/](https://hx-requests-demo.com/)
Docs: [https://hx-requests.readthedocs.io/en/latest/index.html](https://hx-requests.readthedocs.io/en/latest/index.html)
Github: [https://github.com/yaakovLowenstein/hx-requests](https://github.com/yaakovLowenstein/hx-requests) (feel free to give a star 😊)
TL;DR: A package that provides quasi CBV-style views (hx-requests) as dedicated endpoints for HTMX requests, allowing
/r/django
https://redd.it/1jfcnvu
I posted about this package a while ago, but at that point, it was still early in development, and the documentation was lacking. Since then, it has matured a lot, and the documentation has been completely restructured and improved. Additionally, I’ve created a demo site so you can see the package in action with a basic list page featuring CRUD operations (link below).
The core idea of the package (explained in more detail in the docs) is to provide quasi-Django CBV-style views, called hx-requests, which HTMX requests are routed to. This approach separates HTMX-specific logic from your main views by providing dedicated hx-requests to handle them, but at the same time these hx-requests have access to the view’s context, eliminating the need for logic duplication.
There are also other useful features, such as:
* Returning template blocks easily from an hx-request
* Built-in support for Django messages, now with async capabilities
* Integrated modal handling
It’s difficult to summarize everything here, so I’d love for you to check out the demo and documentation and share your feedback!
Demo: [https://hx-requests-demo.com/](https://hx-requests-demo.com/)
Docs: [https://hx-requests.readthedocs.io/en/latest/index.html](https://hx-requests.readthedocs.io/en/latest/index.html)
Github: [https://github.com/yaakovLowenstein/hx-requests](https://github.com/yaakovLowenstein/hx-requests) (feel free to give a star 😊)
TL;DR: A package that provides quasi CBV-style views (hx-requests) as dedicated endpoints for HTMX requests, allowing
/r/django
https://redd.it/1jfcnvu
How to Use Async Agnostic Decorators in Python
At Patreon, we use generators to apply decorators to both synchronous and asynchronous functions in Python. Here's how you can do the same:
https://www.patreon.com/posts/how-to-use-async-124658443
What do you think of this approach?
/r/Python
https://redd.it/1jfpt7q
At Patreon, we use generators to apply decorators to both synchronous and asynchronous functions in Python. Here's how you can do the same:
https://www.patreon.com/posts/how-to-use-async-124658443
What do you think of this approach?
/r/Python
https://redd.it/1jfpt7q
Patreon
How to Use Async Agnostic Decorators in Python | Engineering at Patreon
Get more from Engineering at Patreon on Patreon
Should I stick with Flask or jump ship to NodeJs?
I'm highly proficient in Flask, but I've observed that its community is relatively small compared to other frameworks. What are the reasons behind this? Is it still viable to continue using Flask, or should I consider transitioning to a more popular technology like Node.js?
/r/flask
https://redd.it/1jflpk9
I'm highly proficient in Flask, but I've observed that its community is relatively small compared to other frameworks. What are the reasons behind this? Is it still viable to continue using Flask, or should I consider transitioning to a more popular technology like Node.js?
/r/flask
https://redd.it/1jflpk9
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
pnorm: A Simple, Explicit Way to Interact with Postgres
GitHub: https://github.com/alrudolph/pnorm
# What My Project Does
I built a small library for working with Postgres in Python.
I don’t really like using ORMs and prefer writing raw SQL, but I find Psycopg a bit clunky by itself, especially when dealing with query results. So, this wraps Psycopg to make things a little nicer by marshalling data into Pydantic models.
I’m also adding optional OpenTelemetry support to automatically track queries, with a bit of extra metadata if you want it. example
I've been using this library personally for over a year and wanted to share it in case others find it useful. I know there are a lot of similar libraries out there, but most either lean towards being ORMs or don’t provide much typing support, and I think my solution fills in the gap.
# Target Audience
Anyone making Postgres queries in Python. This library is designed to make Psycopg easier to use while staying out of your way for anything else, making it applicable to a wide range of workloads.
I personally use it in my FastAPI projects here’s an example (same as above).
Right now, the library only supports Postgres.
# Comparison
Orms
SQLAlchemy is a very popular Python ORM library. SQLModel builds on SQLAlchemy with a Pydantic-based interface.
/r/Python
https://redd.it/1jfuqab
GitHub: https://github.com/alrudolph/pnorm
# What My Project Does
I built a small library for working with Postgres in Python.
I don’t really like using ORMs and prefer writing raw SQL, but I find Psycopg a bit clunky by itself, especially when dealing with query results. So, this wraps Psycopg to make things a little nicer by marshalling data into Pydantic models.
I’m also adding optional OpenTelemetry support to automatically track queries, with a bit of extra metadata if you want it. example
I've been using this library personally for over a year and wanted to share it in case others find it useful. I know there are a lot of similar libraries out there, but most either lean towards being ORMs or don’t provide much typing support, and I think my solution fills in the gap.
# Target Audience
Anyone making Postgres queries in Python. This library is designed to make Psycopg easier to use while staying out of your way for anything else, making it applicable to a wide range of workloads.
I personally use it in my FastAPI projects here’s an example (same as above).
Right now, the library only supports Postgres.
# Comparison
Orms
SQLAlchemy is a very popular Python ORM library. SQLModel builds on SQLAlchemy with a Pydantic-based interface.
/r/Python
https://redd.it/1jfuqab
GitHub
GitHub - alrudolph/pnorm: Postgres, Not an ORM
Postgres, Not an ORM. Contribute to alrudolph/pnorm development by creating an account on GitHub.
Janito, an open source code assistance
It uses Claude's optimized tools for file editing and bash commands execution (most likely the same API that powers Claude.AI .
Simple system prompts in order to minimize cost an reduce constrains in the model inference activity.
Ability to adjust the model settings via profiles, and set the role eg. "python developer", "web developer" with role setting.
Janito is in early stages of development, feedback is welcome.
joaompinto/janito: A Language-Driven Software Development Assistant powered by Claude AI
/r/Python
https://redd.it/1jfxnr9
It uses Claude's optimized tools for file editing and bash commands execution (most likely the same API that powers Claude.AI .
Simple system prompts in order to minimize cost an reduce constrains in the model inference activity.
Ability to adjust the model settings via profiles, and set the role eg. "python developer", "web developer" with role setting.
Janito is in early stages of development, feedback is welcome.
joaompinto/janito: A Language-Driven Software Development Assistant powered by Claude AI
/r/Python
https://redd.it/1jfxnr9
claude.ai
Talk with Claude, an AI assistant from Anthropic
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/1jg3nlu
# 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/1jg3nlu
Redditinc
Reddit Rules
Reddit Rules - Reddit
Django patterns for tables in components
I'm building a dashboard of sorts, which will have multiple tables in blocks - each with its own pagination, filtering and sorting
I really like Iommi (for tables) and django-cotton (for components), and considering unpoly or HTMX - is there a way to make them work together?
I was able to get Iommi working fine, but I can see the query parameters are passed to the url, which breaks things - are there any examples or best practices around this?
/r/django
https://redd.it/1jfucok
I'm building a dashboard of sorts, which will have multiple tables in blocks - each with its own pagination, filtering and sorting
I really like Iommi (for tables) and django-cotton (for components), and considering unpoly or HTMX - is there a way to make them work together?
I was able to get Iommi working fine, but I can see the query parameters are passed to the url, which breaks things - are there any examples or best practices around this?
/r/django
https://redd.it/1jfucok
Reddit
From the django community on Reddit
Explore this post and more from the django community