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
New Django Admin Panel – ( Dev version)

Hey Django devs 👋

I’ve been working on a new Django Admin Panel that **extends the default Django admin’s functionality** — not replacing it, but enhancing it to better suit real-world backend needs.

It's called **OctopusDash**, and it aims to make managing your data smoother, faster, and more customizable **while staying true to Django’s philosophy**.

https://preview.redd.it/i9kg4nwkyswe1.png?width=1920&format=png&auto=webp&s=36dfa3b80dac01328c8d86a5cadd37389b457c8e

https://preview.redd.it/j61on3xmyswe1.png?width=1920&format=png&auto=webp&s=7352df25107940d00062ef4e3feebbdaf5ee92ea

https://preview.redd.it/jqkrk1xmyswe1.png?width=1920&format=png&auto=webp&s=cfaec92a52958e89ffa1a76f2755a457a4cc4d8d

https://preview.redd.it/ove3jcxmyswe1.png?width=1920&format=png&auto=webp&s=fa8991290b70e8eb94eba089fdfbe8dedc11954d

https://preview.redd.it/u7lskcxmyswe1.png?width=1920&format=png&auto=webp&s=c562a04f1d726f4b5ed8ba333b65473761ffe1f6

https://preview.redd.it/az6lgnxmyswe1.png?width=1920&format=png&auto=webp&s=7aca7dc3a69dcf6943c16ffda61c93c2b85472aa

https://preview.redd.it/5clq9ixmyswe1.png?width=1920&format=png&auto=webp&s=8ac238dc1bc42ab41a4a81cc42d23641a1480318




it comes with custom input types

# What’s already working:

* 🔍 **Advanced filtering UI**
* Boolean fields with toggles
* Date/Time/Datetime filters (From-To)
* Active filters summary (see and remove filters easily)
* Custom search fields
* 🎯 Cleaner and more modern UX
* ⚙️ Custom model admin display with SVG icons, flexible columns



# Coming soon:

* Custom actions registration (bulk operations, moderation tools)
* Website statistics dashboard (traffic, user activity, etc.)
* Pluggable widgets & analytics views
* Multi-app organization + icon

[Dashboard Link](https://github.com/husseinnaeemsec/octopus-dash)

/r/django
https://redd.it/1k6vjxb
I've created a flask wiki :)

Hey friends!
I just wanted to share a project I’ve been working on for the past few months with my three teammates.
We’ve built a more accessible wiki full of tutorials and helpful resources for Flask development.

It’s a work in progress, and we’re always adding new stuff to make it as useful and long-lasting as possible.
Check it out here: https://flaskwiki.wiki/

Feel free to share your thoughts—or even jump in and contribute if you’d like! :))

Edit: after a lofs of you guy's asked, i made a little discord server. There are almost no living rooms, I'll have to turn it into a real thing as soon as I have 2 minutes ahah

https://discord.gg/jswjGrrK8P

/r/flask
https://redd.it/1k6tv6t
Help with social login

Hi I'm building a saas and I need social login with my DRF backend and Next js client. I cannot for the life of me comprehend the libraries and how the flow works . Right now I'm using simple jwt. So far I've done auth.js for social login in the frontend, I don't know how to get user details like email and username and associate a user with that . Some help would really be appreciated, I've been really spoiler by TokenObtainpairview and Tokenrefreshview and don't know how to implement social login

/r/djangolearning
https://redd.it/1k6qvtp
Just created a Django SaaS Boilerplate

Hey everyone!

I wanted to share my new project with you:

Django SaaS Boilerplate

I built this to save time when starting Django SaaS projects. It has all the basics you need to get going quickly.

If you find it useful, a star on GitHub would be awesome. Pull requests are welcome if you want to contribute.

/r/django
https://redd.it/1k7bcht
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/1k779nd
Thoughts on adding a typing.EnumValues static typing primitive?

I recently had an issue I ran into and had an idea for what I feel would be a really helpful extension to typing, and I wanted to see if anyone else thinks it makes sense.

I was writing a pydantic class with a string field that needs to match one of the values of an Enum.

I could do something like `Literal[*[e.value for e in MyEnum]]`, dynamically unpacking the possible values and putting them into a Literal, but that doesn't work with static type checkers.

Or I could define something separate and static like this:

```
class MyEnum(str, Enum):
FIRST = "first"
SECOND = "second"

type EnumValuesLiteral = Literal["first", "second"]
```

and use `EnumValuesLiteral` as my type hint, but then I don't have a single source of truth, and updating one while forgetting to update the other can cause sneaky, unexpected bugs.

This feels like something that could be a pretty common issue - especially in something like an API where you want to easily map strings in requests/responses to Enums in your Python code, I'm wondering if anyone else has come across it/would want something like that?


EDIT: Forgot to outline how this would work ->

```
from enum import Enum
from typing import

/r/Python
https://redd.it/1k7amvg
Some Free Python Tools I Built for Finding Company Info (CEO, Email, Phone, Domain)

Hey developers who works in lead generation field!

Anyone else tired of manually digging for contact info? I built some simple Python command-line tools to try and speed things up a bit. They're free and open-source.

What they do:

* **CEO-Finder:** Feed it a company name/domain, it uses web search and AI (GPT, Gemini, etc.) to find the CEO.
* **Email-Finder:** Tries to find emails for a company/contact and filters out common junk domains.
* **Phone-Finder:** Scans search results for potential phone numbers.
* **Domain-Finder:** Helps find the actual official website for a company name.
* **(Bonus) Ultimate-Scraper:** A more heavy-duty scraper if you need to pull content from tougher websites.

They use SearXNG (so you control the search source) and are pretty straightforward to run from the terminal.

Grab them from my GitHub if you want to give them a spin:
[**https://github.com/Aboodseada1**](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2FAboodseada1)

Hope they save someone some time! Let me know if they work for you or if you hit any snags.

Happy prospecting!

/r/Python
https://redd.it/1k7gx2e
What are your experiences with using Cython or native code (C/Rust) to speed up Python?

I'm looking for concrete examples of where you've used tools like Cython, C extensions, or Rust (e.g., pyo3) to improve performance in Python code.

* What was the specific performance issue or bottleneck?
* What tool did you choose and why?
* What kind of speedup did you observe?
* How was the integration process—setup, debugging, maintenance?
* In hindsight, would you do it the same way again?

Interested in actual experiences—what worked, what didn’t, and what trade-offs you encountered.

/r/Python
https://redd.it/1k7k2tn
Implementing Partial String Matching Leveraging SQL's LIKE Operator Wildcard

Hey guys.

I recently worked on adding a search feature to a Flask app and discovered a neat way to handle partial string matching using SQL's LIKE operator with wildcards. If you’re building a search function where users can find results by typing just part of a term, this might be useful, so I wanted to share!

The trick is to use a pattern like '%' + search_term + '%' in your query. The % symbols are SQL wildcards: one at the start matches any characters before the search term, and one at the end matches any characters after.

For example, if a user searches for "book", it’ll match "notebook", "bookstore", or "mybook".Here’s how to implemente using SQLAlchemy in a Flask view:

results = Table.query.filter(Table.column.like('%' + searchterm + '%')).all()

This query fetches all records from Table where column contains the search\
term anywhere in its value. It’s a simple, effective way to make your search feature more flexible and user-friendly.

/r/flask
https://redd.it/1k7l3ji
My own programming language

I made my own interpreted programming language in Python.

Its called Pear, and i somehow got it to support library's that are easy to create.

You can check it out here: Pear.

I desperately need feedback, so please go check it out.

/r/Python
https://redd.it/1k7ogiz
Django tip Avoid Infinite Loops with Signals

/r/django
https://redd.it/1k7nuem
Signal-based State Management in Python: How I Brought Angular's Best Feature to Backend Code

Hey Pythonistas,

I wanted to share a library I've been working on called reaktiv that brings reactive programming to Python with first-class async support. I've noticed there's a misconception that reactive programming is only useful for UI development, but it's actually incredibly powerful for backend systems too.

# What is reaktiv?

Reaktiv is a lightweight, zero-dependency library that brings a reactive programming model to Python, inspired by Angular's signals. It provides three core primitives:

Signals: Store values that notify dependents when changed
Computed Signals: Derive values that automatically update when dependencies change
Effects: Execute side effects when signals or computed values change

# This isn't just another pub/sub library

A common misconception is that reactive libraries are just fancy pub/sub systems. Here's why reaktiv is fundamentally different:

|Pub/Sub Systems|Reaktiv|
|:-|:-|
|Message delivery between components|Automatic state dependency tracking|
|Point-to-point or broadcast messaging|Fine-grained computation graphs|
|Manual subscription management|Automatic dependency detection|
|Focus on message transport|Focus on state derivation|
|Stateless by design|Intentional state management|

# "But my backend is stateless!"

Even in "stateless" services, ephemeral state exists during request handling:

Configuration management
Request context propagation
In-memory caching
Rate limiting and circuit breaking
Feature flag evaluation
Connection pooling
Metrics collection

# Real backend use cases I've implemented with reaktiv

# 1. Intelligent Cache Management

Derived caches that automatically invalidate when source data

/r/Python
https://redd.it/1k7kt89
i made a new toy for tkinter called Qpy (or TkChain)! It's so beautiful

What my project does: It's a module for tkinter with a fluent OOP, it supports method chaining for whoever likes that
Target Audiences: mental asylum patients, it's an esoteric toy project
Comparison: Not sure how to compare toy projects.. I guess unlike guizero it has a very unique and fluent oop with method chaining? Yeah I'm just repeating stuff, sorry

If this isn't a good fit for the subreddit please tell me


https://github.com/biscgames/Qpy/blob/main/q.py

Here's an example project:
https://github.com/biscgames/Qpy/blob/main/examples/eventlisteners.py

/r/Python
https://redd.it/1k7yikx
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/1k7zo60
How to

Im 18 M (college student)and have an solid saas idea and i have some experience in python and genric programming and i dont have a lot of money to build my idea and i dont have any experience in django and web dev how can i make an mvp for my saas without hiring or spending money.

/r/djangolearning
https://redd.it/1k6qfqn
Seeking a package/library that handles rectangles containing rectangles recursively

Hi, I am trying to find some pointers to existing packages/libraries that can handle the rectangles containing rectangles.

1. Each rectangle can contain multiple child rectangles. Each child rectangles can also contain grand children rectangles.

2. The location coordinates of the child rectangles are basing on the lower left corner of the parent rectangle relatively. E.g., Rect A contains Rect B (at [1, 1\]). Draw A at [2, 2\] of the canvas, then Rect B should be drawn at [3, 3\] of the canvas.

3. Each rectangle, child rectangle, ..., has an attribute denoting its rotation (0, 90, 180, 270 degs). E.g., If the above Rect B is set to rotate 90 degs, it will be rotate 90 degs, then place at [1, 1\] of the Rect A.

4. All the placement and rotation, ..., are happening recursively. I.e., when Rect B is rotated, its children also rotate respectively.

This seems to have quite common behaviors in diagramming/geometry programming practices. Could some kind souls suggest good packages/libraries doing these?

I have checked shapely. However, it does not handle child rectangles very well. The child rectangles are using the absolute coordinate, same as the parent rectangles.



/r/Python
https://redd.it/1k7xqal
Science 3d plots animation

**What My Project Does**

I made a repository using python to create 3d plots and export them in video.

**Target Audience**

Science enthusiasts, professors, anyone who knows math and/or loves beautiful science.

**Comparison**

The idea differs from others repos because my structure is/will be scalable to add any 3d plot using only the model. I already added the Lorenz attractor and Rössler attractor, but many more will be added.

I will cover all strange/chaotic attractors and related plots that I find beautiful, and improve the framework along the way. If you have any tip, I'm all ears, I plan to do more things using python to show the potential of the language in fields not so explored in the dev community (hard science).

If you want to simulate and generate a new 3d plot, create your PR.

I will use this repo and this Instagram profile to show the progress:

Instagram: https://www.instagram.com/science_plots_3d?igsh=eXhhOHF5NzV2aXV6

GitHub: https://github.com/matheusvra/scientific_plots

/r/Python
https://redd.it/1k7uw2f
PyData Paris 2025

The 2025 edition of the PyData Paris conference will take place on 30th September and 1st October at the Cité des Sciences et de l’Industrie. 🎉
We would love to hear from open-source and data enthusiasts! Please submit a proposal, the CfP is open until Sunday 27th April (yes, in 2 days !).
If you want to support and sponsor the event, please contact us !

You can find the information on our website: https://pydata.org/paris2025

/r/Python
https://redd.it/1k7kke7
The Complete Flask Rest Api Python Guide


Hey, I have made a guide about building rest apis in python with flask, it starts from the basics and covers the crud operations.

In the guide we use Sql with Postgres, and threading is also involved.

I would love to share it in case any one is interested.

The link is: https://www.youtube.com/watch?v=vW-DKBuIQsE

/r/Python
https://redd.it/1k7sarf