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
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
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/1pfau1c
I Love Django

Now that I've been coding for quite a bit I've fallen rather in love with Django's simplicity and how segmented purposes are between templates.html v.s. urls.py v.s. views.py v.s. forms.py v.s. models.py ||| I really like how segregated the logic is, for other frameworks I imagine this is less so the case?

/r/django
https://redd.it/1pfdpun
How many people are building graphQL API using Django?

How many people are building graphQL API using Django?

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