Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
My first ever Django&React platform for discussions cl4rify.com

/r/djangolearning
https://redd.it/1p6dma8
Free minimal Flask starter with SEO/Social meta tags and Bootstrap with 7 basic pages

This is a bare template I use for my own projects. It’s super simple on purpose, the goal is just to give you a solid starting point that handles the boring setup so you can focus on building features.

It includes basic structure for common pages like home, about, login, register, contact, and a simple dashboard.

The UI is intentionally minimal, you’re meant to style and polish it to fit your project. What _s included is all the stuff I hate redoing every time: SEO meta tags, social sharing tags, basic routing, template layout, and navigation.

It’s not a framework or a full starter SaaS kit — just a clean base to build real apps from.

Enjoy!


PS: Routes are all in the app.py file, I debated maybe adding a single blueprint but decided to just keep it simple.

GitHub Link



/r/flask
https://redd.it/1pdug8g
MicroPie (Micro ASGI Framework) v0.24 Released

### What My Project Does
MicroPie is an ultra micro ASGI framework. It has no dependencies by default and uses method based routing inspired by CherryPy. Here is a quick (and pointless) example:

from micropie import App

class Root(App):

def greet(self, name="world"):
return f"Hello {name}!"

app = Root()


That would map to localhost:8000/greet and take the optional param name:

- /greet -> Hello world!
- /greet/Stewie -> Hello Stewie!
- /greet?name=Brian -> Hello Brian!

### Target Audience
Web developers looking for a simple way to prototype or quickly deploy simple micro services and apps. Students looking to broaden their knowledge of ASGI.

### Comparison
MicroPie can be compared to Starlette and other ASGI (and WSGI) frameworks. See the comparison section in the README as well as the benchmarks section.

### Whats new in v0.24?
This release I improved session handling when using the development-only InMemorySessionBackend. Expired sessions now clean up properly, and empty sessions delete stored data. Session saving also moved after after_request middleware that way you can mutate the session with middleware properly. See full changelog here.

MicroPie is in active beta development. If you encounter or see any issues please report them on our GitHub! If you would like to contribute to the

/r/Python
https://redd.it/1pe2fe1
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/1peg2ua
django-model-utils FieldTracker on a third-party app model?

Hello, is there a reliable way to attach FieldTracker to a third-party app model?

I tried

1. models.py: ThirdPartyModel.tracker = FieldTracker...
2. apps.py:ready: ThirdPartyModel.tracker = FieldTracker...
3. apps.py:ready: using contribute_to_class

But none of these attempts were successful.

Getting AttributeError: 'FieldTracker' object has no attribute 'attname'.

Subclassing is not a option.

Thanks

/r/django
https://redd.it/1pdymxr
I built an automated court scraper because finding a good lawyer shouldn't be a guessing game

Hey everyone,

I recently caught 2 cases, 1 criminal and 1 civil and I realized how incredibly difficult it is for the average person to find a suitable lawyer for their specific situation. There's two ways the average person look for a lawyer, a simple google search based on SEO ( google doesn't know to rank attorneys ) or through connections, which is basically flying blind. Trying to navigate court systems to actually see an attorney’s track record is a nightmare, the portals are clunky, slow, and often require manual searching case-by-case, it's as if it's built by people who DOESN'T want you to use their system.

So, I built CourtScrapper to fix this.

It’s an open-source Python tool that automates extracting case information from the Dallas County Courts Portal (with plans to expand). It lets you essentially "background check" an attorney's actual case history to see what they’ve handled and how it went.

What My Project Does

Multi-Attorney Search: You can input a list of attorneys and it searches them all concurrently.
Deep Filtering: Filters by case type (e.g., Felony), charge keywords (e.g., "Assault", "Theft"), and date ranges.
Captcha Handling: Automatically handles the court’s captchas using 2Captcha (or manual input if you prefer).


/r/Python
https://redd.it/1peelsy
D Monthly Who's Hiring and Who wants to be Hired?

For Job Postings please use this template

>Hiring: [Location\], Salary:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] and [Brief overview, what you're looking for\]

For Those looking for jobs please use this template

>Want to be Hired: [Location\], Salary Expectation:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] Resume: [Link to resume\] and [Brief overview, what you're looking for\]

​

Please remember that this community is geared towards those with experience.

/r/MachineLearning
https://redd.it/1pb25zo
Looking for a programming buddy to build using django

Hello,I have been using python since the last 8 years and have mainly used it to develop automation solutions for manual repetitive tasks. Now that I think about it,I do not have any solid experience in developing applications using any technology. I have been interested in developing web applications from a long time but never got past the crud application barrier.

Today I thought to change that and get some real experience in developing a web application which will be more than a simple crud application with a proper database, authentication,caching,message queues all that sort of stuff. I have a few ideas in mind which I'd like to build upon. I'll be doing this after my day job during my free time,so this will be more of a side project.

If anyone is in the same boat or wants to build something in general,please comment or shoot me a DM.

Thankyou for reading.

/r/django
https://redd.it/1peqa7p
Is the 79-character limit still in actual (with modern displays)?

I ask this because in 10 years with Python, I have never used tools where this feature would be useful. But I often ugly my code with wrapping expressions because of this limitation. Maybe there are some statistics or surveys? Well, or just give me some feedback, I'm really interested in this.

What limit would be comfortable for most programmers nowadays? 119, 179, more? This also affects FOSS because I write such things, so I think about it.

I have read many opinions on this matter… I'd like to understand whether the arguments in favor of the old limit were based on necessity or whether it was just for the sake of theoretical discussion.

/r/Python
https://redd.it/1pejhny
Anyone have any success stories from integrating Cap'n Proto with Django?

I've been reconsidering how I ingest data into a Django app, and I'm going to try out using Cap'n Proto for this since it would (theoretically) greatly speed up several management commands I run regularly where I'm doing upserts from a legacy on-site ERP-like system. It currently goes something like:

Legacy ERP >> ODBC >> Flask (also onsite, different bare metal) >> JSON >> Django Command via cron

Those upserts need to be run in the middle of the night, and since they can take a few minutes they are set up with cron to run the management commands. With a Cap'n Proto system, I could get away with running (or, more accurately, streaming) these at any time.

The JSON payloads get kinda big, and there are a bunch of other queries I'd like to be able to run but I just don't because they can get deeply nested very quickly (product >> invoice >> customer >> quotes)

Also, I haven't even scratched the surface of Django 6's background tasks yet, but maybe this would be a good fit for when the time comes to migrate to 6.2.

I've never used Cap'n Proto before so it will be a learning experience but this is

/r/django
https://redd.it/1pemsnk
DR Paper Completely Ripped Off

I made a post a week ago, requesting advice regarding my paper, which was allegedly plagiarized by a few other institutions. The fact that I even have to say allegedly so I don't get sued is very sad. Most people just said to email the authors, which is completely reasonable, so I did and took the post down.

Anyway, I posted this paper called Mixture of Thoughts to arXiv a little over two months ago and submitted it to ICLR. A few days ago, this paper called Latent Collaboration in Multi-Agent Systems came out as a preprint on arXiv. Basically, both of ours are latent collaboration frameworks in the same realm as an MoE/MoA architecture. I did extensive research before publishing my paper, as it was the first to use this latent collaboration idea (even mentioning this term 30+ times in the paper). I read their "LatentMAS" paper, which also claimed that they were the first "latent collaboration" framework. Originally, I reached out to them in good faith that they perhaps missed my paper, and politely referred them to my previous paper. I got some strange response back inferring that they would not cite my paper. Their paper wasn't even submitted

/r/MachineLearning
https://redd.it/1pehf5w
We open-sourced kubesdk - a fully typed, async-first Python client for Kubernetes.

Hey everyone,

[Puzl Cloud](https://puzl.cloud/) team here. Over the last months we’ve been packing our internal Python utils for Kubernetes into kubesdk, a modern k8s client and model generator. We open-sourced it a few days ago, and we’d love feedback from the community.

We needed something ergonomic for day-to-day production Kubernetes automation and multi-cluster workflows, so we built an SDK that provides:

* Async-first client with minimal external dependencies
* Fully typed client methods and models for all built-in Kubernetes resources
* Model generator (provide your k8s API - get Python dataclasses instantly)
* Unified client surface for core resources and custom resources
* High throughput for large-scale workloads with multi-cluster support built into the client

**Repo link:**

[https://github.com/puzl-cloud/kubesdk](https://github.com/puzl-cloud/kubesdk)



/r/Python
https://redd.it/1pet9mi
Feedback on Django based task manager tool with very slow database handling

This is my first post in the Django subreddit, so please bear with me, if it's out of scope or not fulfilling enough.

Over the past years, I have been working on and off on my first Django based project, which is a task manager web-platform being customized to my personal needs. The code is developed based on various tutorials and with help from vibe coding.

I have spent quite some effort to make the web-platform faster, but it still performs relatively slow even for a small database (server response time of 4-6 seconds for less than 500 database entries). I have tried to optimize the code by doing the following:

* Reducing query calls by profiling with queryhnter
* Use select\_related() and prefetch\_related()
* Use Q objects for complex queries
* Detect n+1 queries and solve them

Further I have tried to pin down the reason for the slow performance and have concluded the following:

* Performance issues not related to:
* Html template, as the response is the same with the template out-commented
* SQL query request, as this is insignificant
* Problem (could be) related to:
* View class: Processing of the DB objects (after queries)

None of the above efforts

/r/django
https://redd.it/1pdwth8