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
Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1l8egg6
Is uvloop still faster than asyncio's event loop in python3.13?

Ladies and gentleman!


I've been trying to run a (very networking, computation and io heavy) script that is async in 90% of its functionality. so far i've been using uvloop for its claimed better performance.


Now that python 3.13's free threading is supported by the majority of libraries (and the newest cpython release) the only library that is holding me back from using the free threaded python is uvloop, since it's still not updated (and hasn't been since October 2024). I'm considering falling back on asyncio's event loop for now, just because of this.


Has anyone here ran some tests to see if uvloop is still faster than asyncio? if so, by what margin?

/r/Python
https://redd.it/1l8fwu1
Just finished a beginner Python course – is it worth learning Django now with AI advancing so fast?

Hi everyone,

I just finished a beginner Python course and I'm planning to start learning Django to get into backend development. But recently, I've been seeing a lot about AI tools like ChatGPT, Copilot, etc., being able to generate code, build APIs, and automate a lot of what backend developers do.

So now I'm wondering — is it still worth learning Django and backend development from scratch in 2025, or will most of this work soon be handled by AI?

I'm not expecting to be replaced tomorrow or anything, but I’m just unsure if it's a good long-term path or if I should shift toward something more future-proof.

A few questions I’d really appreciate input on:

Is backend development (with Django or similar frameworks) still a good skill to invest time in?

Will learning it help me become a better developer even if AI helps with code generation?

For those already working in the field, has AI significantly changed how backend work is done?


Would love to hear your thoughts or advice from anyone who's a bit further along!

Thanks in advance.

/r/djangolearning
https://redd.it/1l6a3ki
Starting django

Want to start with django I know models and all, I recently built a form where you can submit info and click a photo and the photo will be redirected to another page, but where do I start learning like things

/r/django
https://redd.it/1l8jdu6
Need advice about managing codebase

So, for starters this is the first real website I've made. The website is a combination of html/css/js on the front, with Django and a sqlite3 database on the back end. Currently I have about 50 paying users and I'm expecting it to increase to the hundreds next year. Concurrent users is usually fairly small and my webserver stats show <2% load on the smallest virtual server they offer.


What I've been doing is buildling on an Ubuntu VM on my computer, testing and such, then I run a deploy script to SSH to my real server in the cloud, upload the changed source code, then bounce gunicorn and the new version of the code is live (adding new games/quizzes mostly). The database gets updated manually - the deploy script makes a backup - by using an import script against the .csv file the data is in. New questions might be in the format of questions.csv

category,question,answer1,answer2,answer3,answer4,difficulty


all of my code is in a giant views.py file that is nearly 2000 lines long (I'm using VSCode). Is this the normal way of doing things? Right now to make it easier

/r/django
https://redd.it/1l86aa3
How to "reverse engineer" your junior django developer job search.

/r/django
https://redd.it/1l8ph3g
Hi Guys! I know Django and started learning RestAPI . So what projects I can make with these two only. Any Playlist or GitHub Repo

Sams as title.

/r/djangolearning
https://redd.it/1l6lr1v
What version do you all use at work?

I'm about to switch jobs and have been required to use only python 3.9 for years in order to maintain consistency within my team. In my new role I'll responsible for leading the creation of our python based infrastructure. I never really know the best term for what I do, but let's say full-stack data analytics. So, the whole process from data collection, etl, through to analysis and reporting. I most often use pandas and duckdb in my pipelines. For folks who do stuff like that, what's your go to python version? Should I stick with 3.9?

P.S. I know I can use different versions as needed in my virtual environments, but I'd rather have a standard and note the exception where needed.

/r/Python
https://redd.it/1l8chj0
Project Generate Beautiful Chessboard Images from FEN Strings 🧠♟️

Hi everyone! I made a small Python library to generate beautiful, customizable chessboard images from FEN strings.


What is FEN string ?

FEN (Forsyth–Edwards Notation) is a standard way to describe a chess position using a short text string. It captures piece placement, turn, castling rights, en passant targets, and move counts — everything needed to recreate the exact state of a game.



🔗 GitHub: chessboard-image

pip install chessboard-image

# What My Project Does

Convert FEN to high-quality chessboard images
Support for white/black POV
Optional rank/file coordinates
Customizable themes (colors, fonts)

# Target Audience

Developers building chess tools
Content creators and educators
Anyone needing clean board images from FEN It's lightweight, offline-friendly, and great for side projects or integrations

# Comparison

python-chess supports FEN parsing and SVG rendering, but image customization is limited
Most web tools aren’t Python-native or offline-friendly
This fills a gap: a Python-native, customizable image generator for chessboards

Feedback and contributions are welcome! 🙌

/r/Python
https://redd.it/1l8hdwz
Should I really use React/Vue with Django instead of alpine js?

I've been using alpine js and I was happy with it. Let me cut to the chase

How it works now: I have a page where user creates an instance. An instance has a bunch of characteristics and foreign key to product (which has category and name itself) and all the fields are static - just stylized selects and inputs, but there is just a change event handler which saves any changes in session so that user could go back to editing

What I'm trying to do: with alpine I replaced two selects (where user chooses product category and product name) with a single button - "select a product" and after clicking a modal appears with options depending on the step - either category or name, once both category and name are selected a card with this product appears and a button turns into "change a product"

What's wrong: everything worked just fine until I started filling this mess with initial values from draft form, so that you need to combine django {% if %} with alpine x-if which turned into a horrible flickering mess

P.S I also have tried using Vue js alongside django with SFC component and i really love it, especially

/r/django
https://redd.it/1l8vc1s
Juvio - UV Kernel for Jupyter

Hi everyone,

I would like to share a small open-source project that brings uv-powered ephemeral environments to Jupyter. In short, whenever you start a notebook, an isolated venv is created with dependencies stored directly within the notebook itself (PEP 723).

🔗 GitHub: https://github.com/OKUA1/juvio (MIT License)

What it does

💡 Inline Dependency Management

Install packages right from the notebook:

%juvio install numpy pandas

Dependencies are saved directly in the notebook as metadata (PEP 723-style), like:

# /// script
# requires-python = "==3.10.17"
# dependencies =
# "numpy==2.2.5",
# "pandas==2.2.3"
#
# ///

⚙️ Automatic Environment Setup

When the notebook is opened, Juvio installs the dependencies automatically in an ephemeral virtual environment (using uv), ensuring that the notebook runs with the correct versions of the packages and Python.

📁 Git-Friendly Format

Notebooks are converted on the fly to a script-style format using # %% markers, making diffs and version control painless:

# %%
%juvio install numpy
# %%
import numpy as np
# %%
arr = np.array(1, 2, 3)
print(arr)


/r/Python
https://redd.it/1l8xwsc
Host your flask app on AWS for free

Just wanted to share another method of hosting your app in a serverless manner using AWS, best part is for most projects it's free as it's well covered by the free tier's generous monthly million requests

We use zappa to package our app and push to Aws with an API gateway that is integrated with our flask packaged as a lambda function. Any API calls will then be routed by zappa's handler to appropriate Flask app's endpoints

Created a YouTube tutorial on this today: https://youtu.be/6Bk-hpI1mNA?si=GqrzhiduAwSKJjAf

Appreciate any feedback, thanks!

/r/flask
https://redd.it/1l8zdgg
Is Python really important for cybersecurity?

I've seen some people saying that Python isn't really necessary to get started in the field, but I began learning it specifically because I plan to move into cybersecurity in the future. I’d love to hear from people already working in the area — how much does Python actually matter?

/r/Python
https://redd.it/1l95skp
Building Dynamic Django Forms

Hi guys, whats your proven strategy (and/ or library) for building dynamic django forms that can span multiple pages with save point.

/r/django
https://redd.it/1l8vonr
How to deploy my flask web app

I used Google AI Studio to create a web-based customer management and payment collection dashboard, primarily designed for cable operators. It was built using Flask (Python) and Bootstrap (HTML/CSS). This application helps manage customers, track payments, generate reports, and provide actionable business insights. The website looks good and is useful to me, but I want to deploy it on the internet. I have watched many tutorials on YouTube, but none of them worked for me. I tried platforms like Vercel, Render, Railway, and more, but they gave me various errors. I am a beginner and not very familiar with the code, so can you please help me? I will provide the GitHub source code link.

/r/flask
https://redd.it/1l8uirt
What was your first Django application?

Mine was accounting application for my trader character in EVE Online.

It read my buy/sell transactions from the official API, parsed the data with xml.sax, and calculated the profit margin per item. Also, it used special html tags for EVE's in-game browser.

/r/django
https://redd.it/1l8nr9n
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/1l987wu
Deploying to vercel

How can i deploy a flask app to vercel with these requirements:

flask==3.0.2
flask-cors==4.0.0
scikit-learn==1.4.1.post1
numpy==1.26.4
xgboost==2.0.3
pandas==2.2.0
tensorflow-cpu==2.16.1

I am getting a maximum size of 300mb file limit

Note: I am using python 3.11 in my local flask app

/r/flask
https://redd.it/1l9d6xi
How can I access currentuser outside of an route.

Hello, im trying to make a polling mechanism, so im making a background process using "ThreadPoolExecutor", I added a status boolean to my users table so they will only be able to send 1 request at time, but i´ve ran into a problem where I cant change the current\
user.status to False after the background process is over since its outside of an route.

def backgroundtranslation(filecontent, wmodel, transcription, model, pitch, speechrate, userid):
try:
srt
file = whispertranscribe(filecontent, wmodel, transcription)
audio = text
tospeech(srtfile, model, pitch, speechrate)
output = add
stream(audio, filecontent)

# Save as user
id.mp4
destination = os.path.join(CONTENTFOLDER, f"{userid}.mp4")
shutil.move(output, destination)

print(f"Translation complete: saved to {destination}")


/r/flask
https://redd.it/1l8uuq3
Mastering Modern Time Series Forecasting: A Python Guide to Statistical, ML & Deep Learning Methods

I’ve been working on a Python-focused book called Mastering Modern Time Series Forecasting — written to bridge the gap between theory and practice for time series modeling.

It covers a wide range of methods, from classical models like ARIMA, ETS, Theta, MSTL, TBATS to modern machine learning and deep learning techniques like CatBoost, LightGBM, Transformers, N-BEATS, and TFT.

The focus is on both fundamentals and practical implementation, using tools like statsforecastmlforecastneuralforecastscikit-learnstatsmodelsPyTorch, and Darts. Topics include handling messy time series data, feature engineering, evaluation, and deployment.

📘 The book is in early release (220+ pages) and growing fast.
📂 A companion GitHub repo is live and code will be added progressively:
🔗 GitHub Repo

I’m publishing the book on Gumroad and LeanPub — links will be in the comments if anyone’s interested.

Open to feedback or discussion — thanks for reading!

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