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
I created a wrapper for google drive, google calendars, google tasks and gmail

GitHub: https://github.com/dsmolla/google-api-client-wrapper

PyPI: https://pypi.org/project/google-api-client-wrapper/

What my project does:

Hey, I made a simple, and easy to use API wrapper for some of Google's services. I'm working on a project where I need to use google's apis and I ended up building this wrapper around it and wanted to share it here in case anyone is in the same boat and don't want to spend time trying to figure out the official API.

Target Audience

This is for developers who are working on a project that uses Google's APIs and are looking for easy to understand wrappers

Comparison

Data Models like EmailMessage, Event, DriveFolder, Task vs. Raw API responses
Helper Methods
Built-in support for multiple accounts
Query builders vs. Manually writing raw queries
Clear documentation and Easy to navigate
Similar patterns in all services


I will add async support soon especially for batch operations

/r/Python
https://redd.it/1movsu6
I generated a visual diagram for Flask

Hey all I recently created an open-source project which generates accurate diagrams for codebases.
As I have used flask multiple times in my past for simple endpoint projects I generated one for the community here:

https://preview.redd.it/ttm0nghbkoif1.png?width=1292&format=png&auto=webp&s=3527dfa2a6131082ea7fc39fbf2184593655ad33

It is quite interesting to see how it differentiates from other framework as the diagram gives a quick overview of what actually happens under the hood. The diagram is interactive and you can click and explore the components of it and also see the relevant source code files, check the full diagram is here: https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/flask/on\_boarding.md
And the open-source tool for generation is: https://github.com/CodeBoarding/CodeBoarding

/r/flask
https://redd.it/1mopr9e
I made this “plug and drop” Django library and need some advice

I’m learning Django and Python at work, and to push myself I built a “plug and drop” Django library with several small apps — accounts, profiles, logging, and even 2FA. I’m still struggling with the basics though, and I’d love advice on how to improve my learning process.

The company I work for is *really* small — about 5 people total, including me. We’re only two who code, one who designs the websites (mostly via WordPress), and one who handles SEO and marketing.
Before I joined this team, I hadn’t coded for about 5 years, and back then it was mostly HTML and CSS.

Here’s my issue:
I understand about 75% of the code written by GPT or the other coder in the company, but when it comes to simple things like `for` loops, `if/else` statements, and basic Python/Django syntax, I often can’t remember or figure out how to write them from scratch.

To help myself learn, I came up with the idea of making a small library of apps that could be useful and also serve as a learning project.
It consists of:

* **An account app** – simple login and registration form, built with a custom user model (not

/r/django
https://redd.it/1moxg27
How to properly register a user

Hey, I have an app where users can register either as Sponsors or as Watchers (normal users).
Currently, I have two apps:

Sponsor, with its own [`models.py`](http://models.py) containing specific fields
Watcher, with its own `models.py` containing different fields

Now, I'm wondering:
Should I create a separate app called User or Accounts to handle all user registrations centrally, and then redirect users to the Sponsor or Watcher apps to complete their profile registration?
Or should I have separate "Register as Sponsor" and "Register as Watcher" links that lead directly to the respective Sponsor or Watcher apps, where registration and profile completion are handled independently?

/r/djangolearning
https://redd.it/1mmdsb6
Django tip Serializing Reverse Relationships

/r/django
https://redd.it/1mp30al
FT8Decoder - A Library for the Parsing and Enrichment of FT8 Radio Messages

Hey everyone! I just released my first Python package, [FT8Decoder](https://pypi.org/project/ft8decoder/).

Earlier this summer I got into amateur radio as a hobby and stumbled across [FT8 transmissions](https://www.youtube.com/watch?v=qInOSHfT8jA) while exploring WebSDR. I was intrigued by the spooky alien sounding tones and wanted to know what they meant. I installed WSJT-X, which decodes them in real time, but as a newcomer, “CQ ABDCE FN41” or “KWB8R KCQ4N R-08” didn’t really give me the clarity I was looking for.

So, I went looking for a Python library that could translate these into readable messages in a fun little script. I couldn’t find one, so I decided to build one myself. From there my little library grew into a full FT8 logging and enrichment tool.

**What my Project Does:**

* Parses WSJT-X UDP packets into clean Python objects
* Classifies all FT8 message types (CQ calls, QSOs, signal reports, acknowledgments, etc.)
* Tracks and organizes the state of every FT8 QSO from CQ to 73
* Translates messages such as "KWB8R KCQ4N R-08" into readable text: "KCQ4N says Roger and reports a signal report of -08 to KWB8R."
* Enriches data with frequency offset, MHz conversion, band detection, and more
* Performs Grid square lookups with lat/lon output and interactive map support (Folium)
* Exports

/r/Python
https://redd.it/1mp4w8k
Potty - A CLI tool to download Spotify and youtube music using yt-dlp

Hey everyone!

I just released **Potty**, my new Python-based command-line tool for downloading and managing music from Spotify & YouTube using **yt-dlp**.

This project started because I was frustrated with spotify and I wanted to self-host my own music, and it evolved to wanting to better manage my library, embed metadata, and keep track of what I’d already downloaded.

Some tools worked for YouTube but not Spotify. Others didn’t organize my library or let me clean up broken files or schedule automated downloads. So, I decided to build my own solution, and it grew into something much bigger.

# 🎯 What Potty Does

* **Interactive CLI menus** for downloading, managing, and automating your music library
* **Spotify data integration**: use your exported `YourLibrary.json` to generate tracklists
* **Download by artist & song name** or batch-download entire lists
* **YouTube playlist & link support** with direct audio extraction
* **Metadata embedding** for downloaded tracks (artist, album, artwork, etc.)
* **System resource checks** before starting downloads (CPU, RAM, storage)
* **Retry manager** for failed downloads
* **Duplicate detection & file organization**
* **Export library data** to JSON
* **Clean up** broken or unreadable tracks
* **Audio format & bitrate selection** for quality control

# 👥 Target Audience

Potty is

/r/Python
https://redd.it/1mp7nd1
Astral's first paid offering announced - pyx, a private package registry and pypi frontend

https://astral.sh/pyx

https://x.com/charliermarsh/status/1955695947716985241

Looks like this is how they're going to try to make a profit? Seems pretty not evil, though I haven't had the problems they're solving.

/r/Python
https://redd.it/1mperw4
AskOra - one CLI to talk to OpenAI, Ollama, and more (without losing your mind)

**What My Project Does:**
AskOra is a Python CLI that lets you send prompts to multiple AI providers (OpenAI, Ollama, etc.) using the **same syntax**. It returns structured JSON responses including output, tokens used, and execution time. Works both sync and async.

**Target Audience:**
Developers who want a simple, unified CLI for experimenting with AI models. Good for scripts, testing, or tinkering with AI without installing a dozen different tools.

**Comparison:**
Unlike installing separate CLIs for each AI provider, AskOra lets you use one command for all. It also provides structured outputs and supports async calls, which most other CLIs don’t.

**Quick Example:**

askora --type openai --key YOUR_KEY --model gpt-4o-mini --prompt "Write me a haiku"

For Ollama (local model):

askora --type ollama --base-url http:/localhost:11434 --model codellama --prompt "Are you a good coder"

**Links:**

* GitHub: [https://github.com/jetroni/askora](https://github.com/jetroni/askora)
* PyPI: [https://pypi.org/project/askora](https://pypi.org/project/askora)

Try it out, break it, and give feedback!

/r/Python
https://redd.it/1mphhr2
Introducing dj-redis-panel, a package for inspecting and querying redis from the django admin

Hey everyone. I've built a tool for querying and inspecting redis instances inside of the django admin. I've been using django for quite a long time and I always like to consolidate tools into a single control pane (django admin in this case). Please take a look, and hopefully it is of use to somebody here.


github: https://github.com/yassi/dj-redis-panel

docs: https://yassi.github.io/dj-redis-panel/

pypi: https://pypi.org/project/dj-redis-panel/

/r/django
https://redd.it/1mpe6fe
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/1mpkzoc
Python 3.13 REPL keyboard mappings/shortcuts/bindings

I couldn't find a comprehensive list of keyboard shortcuts for the new REPL, so here's the source code:

https://github.com/python/cpython/blob/3.13/Lib/\_pyrepl/reader.py#L66-L131

\\C means Ctrl, \\M means meta (Alt key on Windows/Linux, Option[?\] on mac).

Of particular interest, on the Windows 10 Terminal, pressing Ctrl+Alt+Enter while editing a block of code will "accept" (run) it without having to go to the end of the last line and pressing Enter twice. (Alt+Enter on Windows switches to/from full screen mode). on Ubuntu, it's Alt+Enter. i don't have a mac to test on -- if you do, let me know in the comments below.

Other related/interesting links:

https://treyhunner.com/2024/10/adding-keyboard-shortcuts-to-the-python-repl/

https://www.youtube.com/watch?v=dK6HGcSb60Y

|Keys|Command|
|:-|:-|
|Ctrl+a|beginning-of-line|
|Ctrl+b|left|
|Ctrl+c|interrupt|
|Ctrl+d|delete|
|Ctrl+e|end-of-line|
|Ctrl+f|right|
|Ctrl+g|cancel|
|Ctrl+h|backspace|
|Ctrl+j|accept|
|Ctrl+k|kill-line|
|Ctrl+l|clear-screen|
|Ctrl+m|accept|
|Ctrl+t|transpose-characters|
|Ctrl+u|unix-line-discard|
|Ctrl+w|unix-word-rubout|
|Ctrl+x Ctrl+u|upcase-region|
|Ctrl+y|yank|
|Ctrl+z|suspend|
|Alt+b|backward-word|
|Alt+c|capitalize-word|
|Alt+d|kill-word|
|Alt+f|forward-word|
|Alt+l|downcase-word|
|Alt+t|transpose-words|
|Alt+u|upcase-word|
|Alt+y|yank-pop|
|Alt+-|digit-arg|
|Alt+0|digit-arg|
|Alt+1|digit-arg|
|Alt+2|digit-arg|
|Alt+3|digit-arg|
|Alt+4|digit-arg|
|Alt+5|digit-arg|
|Alt+6|digit-arg|
|Alt+7|digit-arg|
|Alt+8|digit-arg|
|Alt+9|digit-arg|
|Alt+\\n|accept|
|Esc [200\~|enable_bracketed_paste|
|Esc [201\~|disable_bracketed_paste|
|Ctrl+<left>|backward-word|
|Ctrl+<right>|forward-word|
|Esc [3\~|delete|
|Alt+<backspace>|backward-kill-word|
|<end>|end-of-line|
|<home>|beginning-of-line|
|<f1>|help|
|<f2>|show-history|
|<f3>|paste-mode|
|\\EOF|end|
|\\EOH|home|

keywords: pyrepl, _pyrepl, pypy repl

/r/Python
https://redd.it/1mplowa
How do you automate emails with Django?

Hello guys,

In my website I got a register form and I made it so that whenever I get a new registration (a new registry in my database) I will get an email so that I would check my admin panel.

First I used the standard Gmail SMPT 587, I set an App password and it worked locally just like butter, the emails were sent instantly.

But when I got to production (used Digitalocean) it stopped sending emails, or more precisely it keeps loading forever, it's like Django is trying to connect but can't. Chatgpt said that 'Some cloud providers block outbound SMTP ports (25, 465, 587) to prevent spam' and suggested that I switch to something like Brevo, I created an account and set up everything (port 2525) but I still can't send emails on registry. even though (unlike gmail smpt) I CAN connect to it from the server and CAN send emails from server but when I try to do it from my website it takes forever or crashes.

Any advice on what should I do or use differently ? and is there a good free option to it?

/r/django
https://redd.it/1mpmrs1
Tool that converts assembly code into Minecraft command blocks

Tired of messy command block contraptions? I built a Python tool that converts assembly code into Minecraft command blocks and exports them as WorldEdit schematics.

It's the very start of the project and i need you for what i need to add

**Write this:**

SET R0, #3
SET R1, #6
MUL R0, R1
SAY "3 * 6 = {R0}"

**Get working command blocks automatically!**

# Features

* Custom assembly language with registers (R0-R7)
* Arithmetic ops, flow control, functions with CALL/RET
* Direct .schem export for WorldEdit
* Stack management and conditional execution

**GitHub**: [Assembly-to-Minecraft-Command-Block-Compiler](https://github.com/Bowser04/Assembly-to-Minecraft-Command-Block-Compiler)

Still in development - feedback, suggestions or help are welcome!

The target audience is people interested in this project that may seem crazy or contributor

*Yes, it's overkill. That's what makes it fun! 😄 It's literally a command block computer*

For alternatives I don't know any but they must exist somewhere. So why me it's different because my end goal is a python to minecraft command block converter through a shematic

/r/Python
https://redd.it/1mptj7m
Anyone Interested in Building a Django Course Upload Site with Me?

https://preview.redd.it/mr9ytu43dshf1.jpg?width=1280&format=pjpg&auto=webp&s=30f99841087d31f6a5837b04980c1423c2e017d1

https://preview.redd.it/ksezky74dshf1.jpg?width=1280&format=pjpg&auto=webp&s=af99c39e368a2df1df686ba7dc658ce617c25617

https://preview.redd.it/f0nktp45dshf1.jpg?width=774&format=pjpg&auto=webp&s=cbdb68213b5acc2cc976ee2208d5f8874c0b537a

Anyone interested in making this project with me?

I want someone who knows Django and frontend. You don’t have to be an expert. I have added lots of features. I’m making this site for blog-type course uploading for everyone. It can be your portfolio project.

/r/djangolearning
https://redd.it/1mktd7p
Hello

Hello friends, I am a beginner developer and I am creating a website, I almost finished my first project, I got stuck on adding a promo code, the intended page and the user must enter the promo code to receive the product. I am interested in your opinion, how good an idea is it to add promo codes to the database (in my case I use ssms) and from there check if such a promo code exists, then I will give the product to the user and if it does not exist then Flash will throw an error. Promo codes should be different and unique. I am also wondering if there is a way to solve this problem without using the database. Thanks for the answer <3

/r/flask
https://redd.it/1mpp01q
Did anyone lese panic from 'integration' things when starting out with backend?

Hey there, I use Django for many projects and I'm planning to use it for more. The idea is, whenever I learn a new Django concept or backend in general, it always needs to be integrated with something else to work in real production level. For example, Django it self connects to DRF, DRF should include JWT or other type of auth system, Django again connects with Postgres or other type of DB, or if you want to make something different like a real-time communication app, you should be aware of different middlewares to perform auth, etc. This adding with the 'shiny object syndrome' it ends up with frustration (especially at the beginning). I know Django makes this kind of stuff a lot easier compared to other frameworks. What was your approach for this kind of process in your learning and dev journey, should I skip these parts for later and only focus on one solid concept, or should proceed integrating things that I don't know how they work internally? your insights will be help full.

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