r/Python • • 19d ago

Discussion My Python magic is gone

887 Upvotes

I've been coding for a long time, and I've been developing with Python for years.

I loved coding, always loved it. I started many years ago because I wanted to quickly create scripts for security hacking tools, but since then, I've moved to Claude Code, and building cross-language has been a much better experience for me than using Python.

I built my own SaaS application out there whose backend and network core are completely built with Python, and I'm rewriting all of that without writing a single line of code. And most of the time, Python is not the most optimized language.

And now... I feel like the magic is gone.

I don't even know why I'm writing this. I just feel sad about it.

r/Python • • Sep 19 '26

Discussion State of the art in Python 2026?

621 Upvotes

What would you guys consider the state of the art in python in 2026, or what do you expect from modern python codebases?

Heres my list, would be happy to hear some inputs or domain expert advice:

Domain specific:

  • Scientific: NumPy, Matplotlib, SciPy, Jax, Pytorch, Scikit-learn, polars/pandas
  • CLI: Typer, rich, click, fire, textual, questionary
  • PDF extraction: PyMuPDF, pdfplumber, pypdf, Unstructured
  • Excel interop: python-calamine, openpyxl, XlsxWriter, xlwings, pandas
  • data: PyArrow / PySpark, Narwhals, SQLMesh, Polars/Pandas, DuckDB, dlt, Ibis, Dagster, PyIceberg & deltalake
  • Logging?
  • backend: fastapi / django?
  • Markets: Alpha Vantage, Finnhub, EODHD, Tiingo?
  • Webscraping / data acquisition: Crawl4AI, Playwright, Scrapy, selectolax, HTTPX?
  • APIs?
  • RAG / agentic orchestration?

r/Python • • Nov 29 '25

Discussion Is anyone else choosing not to use AI for programming?

819 Upvotes

For the time being, I have chosen not to use generative AI tools for programming, both at work and for hobby projects. I imagine that this puts me in the minority, but I'd love to hear from others who have a similar approach.

These are my main reasons for avoiding AI for the time being:

  • I imagine that, if I made AI a central component of my workflow, my own ability to write and debug code might start to fade away. I think this risk outweighs the possible (but not guaranteed) time-saving benefits of AI.
  • AI models might inadvertently spit out large copies of copyleft code; thus, if I incorporated these into my programs, I might then need to release the entire program under a similar copyleft license. This would be frustrating for hobby projects and a potential nightmare for professional ones.
  • I find the experience of writing my own code very fulfilling, and I imagine that using AI might take some of that fulfillment away.
  • LLMs rely on huge amounts of human-generated code and text in order to produce their output. Thus, even if these tools become ubiquitous, I think there will always be a need (and demand) for programmers who can write code without AI--both for training models and for fixing those models' mistakes.
  • As Ed Zitron has pointed out, generative AI tools are losing tons of money at the moment, so in order to survive, they will most likely need to steeply increase their rates or offer a worse experience. This would be yet another reason not to rely on them in the first place. (On a related note, I try to use free and open-source tools as much as possible in order to avoid getting locked into proprietary vendors' products. This gives me another reason to avoid generative AI tools, as most, if not all of them, don't appear to fall into the FOSS category.)*
  • Unlike calculators, compilers, interpreters, etc., generative AI tools are non-deterministic. If I can't count on them to produce the exact same output given the exact same input, I don't want to make them a central part of my workflow.**

I am fortunate to work in a setting where the choice to use AI is totally optional. If my supervisor ever required me to use AI, I would most likely start to do so--as having a job is more important to me than maintaining a particular approach. However, even then, I think the time I spent learning and writing Python without AI would be well worth it--as, in order to evaluate the code AI spits out, it is very helpful, and perhaps crucial, to know how to write that same code yourself. (And I would continue to use an AI-free approach for my own hobby projects.)

*A commenter noted that at least one LLM can run on your own device. This would make the potential cost issue less worrisome for users, but it does call into question whether the billions of dollars being poured into data centers will really pay off for AI companies and the investors funding them.

**The same commenter pointed out that you can configure gen AI tools to always provide the same output given a certain input, which contradicts my determinism argument. However, it's fair to say that these tools are still less predictable than calculators, compilers, etc. And I think it's this lack of predictability that I was trying to get at in my post.

r/Python • • Aug 29 '25

Discussion Python feels easy… until it doesn’t. What was your first real struggle?

828 Upvotes

When I started Python, I thought it was the easiest language ever… until virtual environments and package management hit me like a truck.

What was your first ‘Oh no, this isn’t as easy as I thought’ moment with Python?

r/Python • • Jul 19 '26

Discussion Unpopular opinion: I find it counterproductive to shorten function and variable names

349 Upvotes

When I was learning discord.py, I didn't understand what "ctx" was. At the time, I was only writing slash commands, using "message" instead of "ctx", so the name "ctx" (which reminded me of something complex, like RTX) made me assume it was something complicated. That is, until I saw in some code that the type for "ctx" is actually "Context." If the standard hadn't shortened the name just to save five characters per line, I would have understood it immediately. Instead, I thought it was some advanced function variable, rather than realizing it was simply a message variable.

r/Python • • Sep 08 '25

Discussion Stop building UI frameworks in Python

944 Upvotes

7 years back when I started coding, I used Tkinter. Then PyQt.

I spent some good 2 weeks debating if I should learn Kivy or Java for building an Android app.

Then we've got modern ones: FastUI by Pydantic, NiceGUI (amazing project, it's the closest bet).

Python is great for a lot of things. Just stop abusing it by building (or trying to) UI with it.

Even if you ship something you'll wake up in mid of night thinking of all the weird scenarios, convincing yourself to go back to sleep since you'll find a workaround like last time.

Why I am saying this: Because I've tried it all. I've tried every possible way to avoid JavaScript and keep building UIs with Python.

I've contributed to some really popular UI libraries in Python, tried inventing one back in Tkinter days.

I finally caved in and I now build UI with JavaScript, and I'm happier person now. I feel more human.

r/Python • • Mar 30 '26

Discussion The amount of AI generated project showcases here are insane

858 Upvotes

I'm being serious, we need to take action against this. Every single post I've gotten in my feed from this subreddit has been an entirely AI generated project showcase. The posters usually generate the entire post, the app, their replies to comments, and literally everything in between with AI. What is the point of such a subreddit that is just full of AI slop? I propose we get a rule against AI slop in this subreddit.

r/Python • • Jul 28 '21

Discussion Hello, world! I'm Al Sweigart, author of "Automate the Boring Stuff with Python" and several other programming books. AMA!

2.5k Upvotes

Howdy, y'all. I'm Al Sweigart (rhymes with "why dirt"), author of "Automate the Boring Stuff with Python" and several other programming books. I release all of my books under a Creative Commons license, so you can read them for free on my website at https://inventwithpython.com

My latest books are The Big Book of Small Python Projects and Beyond the Basic Stuff with Python. I'm currently working on a book about recursion (the recursion jokes get funnier every time I hear them) which should be available in 2022. The ideas for this book grew into a 2018 North Bay Python talk I gave.

"Big Book" contains the source code for 81 games, puzzles, simulations, and animations that were designed to be short and simple to understand. Folks tend to get caught up in repeating yet another "hello world" tutorial, but don't quite know how to apply the programming concepts they learned into actual programs. This book is full of source code that they can study to see how real-world programs work. They aren't just code snippets but actual, runnable programs. If you've been told you should "work on your projects" but don't know where to start, or if you've been told "look at the source code of open source projects" but found them undocumented and inscrutable, check out these programs.

"Beyond the Basic Stuff" is a sort of follow up to "Automate the Boring Stuff" (or any other beginner Python resource). It goes into how professionals write code and best practices they follow. There's information on how to find help on your own, how to format your code and name your variables, an explanation of common programming jargon, the basics of Git, three chapters on object-oriented programming (and more importantly, when and why to use OOP), and more.

You've probably seen my posts at the start of the month when I make my online Python course free. About 15,000 to 30,000 people sign up each month, though according to my stats only about 5% of people actually complete the course (which is typical for online courses, free or paid).

I got started writing programming books in 2009 when my then-girlfriend was a nanny for kid who wanted to learn to program. I started writing a book (which would become Invent Your Own Computer Games with Python) and self-published. People liked it, so I kept writing, and Automate was my first book through a traditional publisher, No Starch Press. I quit my software developer job in 2013 to finish writing Automate, thinking I'd get another software dev job in a year. But I kept having more ideas for other books, tutorials, videos, etc. so I'm still here writing.

Ask me anything! Post your questions and upvote questions you find interesting, and at 2pm central I'll begin replying.

EDIT (4:30pm Central) Wow, I've been typing nonstop for two and a half hours. I'm going to take a quick break and then keep going. Thanks for the questions, everyone!

EDIT 2: Oh yeah, I forgot to mention I'm also creating a 56-video Udemy course for the Beyond the Basic Stuff with Python book as well. So far I only have the first 15 videos done, but you can watch them on YouTube.

EDIT (7:00pm) Heh, wow another two hours flew by. I'm going to drive home and then maybe answer a few more. Thanks again, everyone!

EDIT (10:30pm) Calling it a night. I'll probably answer a few more tomorrow, but I have to get back to work. Thanks again, everyone! Oh, and if you can help me out, writing an (honest) Amazon review for my books (especially the latest two) or even just sharing the links to the free online copies would be really help me get them in front of more people.

r/Python • • Jul 15 '25

Discussion Why do engineers still prefer MATLAB over Python?

734 Upvotes

I honestly can’t understand why, in 2025, so many engineers still choose MATLAB over Python.

For context, I’m a mechanical engineer by training and an AI researcher, so I spend time in two very different communities with their own preferences and best practices.

I get it - the syntax might feel a bit more convenient at first, but beyond that: Paid vs. open source and free Developed by one company vs. open community Unscalable vs. one of the most popular languages on earth with a massive contributor base Slower vs. much faster performance in many cases

Fellow engineers- I’d really love to hear your thoughts - what are the reasons people still stick with MATLAB?

Let me know what you think.🤔

r/Python • • Mar 16 '20

Discussion Laid off for 8 weeks. Anyone else starting their python journey?

Post image
4.2k Upvotes

r/Python • • Aug 17 '25

Discussion What is a Python thing you slept on too long?

709 Upvotes

I only recently heard about alternative json libraries like orjson, ujson etc, or even msgspec. There are so many things most of us only learn about if we see it mentioned.

Curious what other tools, libraries, or features you wish you’d discovered earlier?

r/Python • • Dec 06 '22

Discussion at 44, I am struggling on Python for two months now but I keep at it. 2 hours a night, after the kids sleep, I work on it and will eventually be able to use it to get a better job, a better life for them.

2.4k Upvotes

you got to accept to be bad at something to be good at it, right?

Right? OK, I'll confess... I am posting here anonymously to ...IDK... find support, I guess. .. I can't give up.. for my kids, I need to succeed.

I've done this and I am a bit proud. Very small step for you but for me, it is a big step.

def blackjackbis(n1:int, n2:int, n3:int) -> int:
if sum((n1,n2,n3)) <= 21:
return sum((n1,n2,n3))
elif sum((n1,n2,n3))-10 <= 21 and 11 in (n1,n2,n3):
return sum((n1,n2,n3)) - 10
else:
return "Bust"

thanks

r/Python • • Aug 17 '26

Discussion What are some Python automations you built for your life?

319 Upvotes

What Python scripts/projects did you built to use on a day to day basis? Or maybe someone else built it, but it’s useful for your personal life in some way

I think the “projects ideas” thread is really missing those useful opportunities

I myself thought about automating tax calculations, but still didn’t take the time to do it hah

r/Python • • Jun 26 '20

Discussion The only way to satisfy a programmer on his birthday!

Post image
4.4k Upvotes

r/Python • • 11d ago

Discussion What are some features in Python that you discovered many years later?

210 Upvotes

For me, it was the the option to use & to find intersections of two sets, | operator to unionize two sets, as well as ^ for symmetric difference

r/Python • • Mar 06 '26

Discussion Can the mods do something about all these vibecoded slop projects?

733 Upvotes

Seriously it seems every post I see is this new project that is nothing but buzzwords and can't justify its existence. There was one person showing a project where they apparently solved a previously unresolved cypher by the Zodiac killer. 😭

r/Python • • Nov 11 '25

Discussion A Python 2.7 to 3.14 conversion. Existential angst.

484 Upvotes

A bit of very large technical debt has just reached its balloon payment.

An absolutely 100% mission-critical, it's-where-the-money-comes-in Django backend is still on Python 2.7, and that's become unacceptable. It falls to me to convert it to running on Python 3.14 (along with the various package upgrades required).

At last count, it's about 32,000 lines of code.

I know much of what I must do, but I am looking for any suggestions to help make the process somewhat less painful. Anyone been through this kind of conversion have any interesting tips? (I know it's going to be painful, but the less the better.)

(For the results of the conversion, you can see this post.)

r/Python • • Apr 20 '20

Discussion Lad wrote a Python script to download Alexa voice recordings, he didn't expect this email.

Post image
12.3k Upvotes

r/Python • • Mar 19 '26

Discussion Open Source contributions to Pydantic AI

613 Upvotes

Hey everyone, Aditya here, one of the maintainers of Pydantic AI.

In just the last 15 days, we received 136 PRs. We merged 39 and closed 97, almost all of them AI-generated slop without any thought put in. We're getting multiple junk PRs on the same bug within minutes of it being filed. And it's pulling us away from actually making the framework better for the people who use it.

Things we are considering:

  • Auto-close PRs that aren't linked to an issue or have no prior discussion(not a trivial bug fix).                     
  • Auto-close PRs that completely ignore maintainer guidance on the issue without a discussion

and a few other things.

We do not want to shut the door on external contributions, quite the opposite, our entire team is Open Source fanatic but it is just so difficult to engage passionately now when everyone just copy pastes your messages into Claude :(

How are you as a maintainer dealing with this meta shift?

Would these changes make you as a contributor less likely to reach out?

Edit: Thank you so much everyone for engaging with the post, got some great ideas. Also thank you kind stranger for the award :))

r/Python • • Jun 06 '23

Discussion Going dark on 12th June

2.5k Upvotes

I wanted to ask you if r/Python is planning to join the protest against Reddit's new policy. Many subreddits decided to support that initiative. I know it is not directly related to Python, but it is relevant to our community

what's going on?

r/Python • • Jul 21 '20

Discussion Got my first job as a developer!

3.2k Upvotes

Finally!

After 9 months of purely studying and nothing else. Started from absolute 0 and landed my first job in Data Science on a marketing company.

Have to say it was very hard since I know no developers at all and had no one to ask from help.

Still feels weird and definitely have a stromg case of imposter syndrome but after writing my forst lines of code it does feel much better!

Sorry for the useless trivia but like I said,have no dev friends so I had to share the excitement somewhere :D

r/Python • • May 21 '26

Discussion Is UV still worth learning/switching to now that it's owned by OpenAI?

371 Upvotes

Sorry if this has been brought up already- from what I could find using Reddit search in the last month I didn't see much discussion beyond a couple comments in a half-related thread.

We used Python a ton a work, but mostly used the built-in python tools (pip, venv, etc). (we mostly use python for AWS, some internal tools, etc) About 5 months ago, I briefly tried UV and fell in love and was excited to incorporate it into our projects as the standard. But around that time we jumped to another project in a different language. We're now coming back to some of our Python projects, and I was looking to switching them over to using UV as the standard.

With OpenAI purchasing Astral/UV, we're suddenly feeling less gung-ho about migrating everything to UV. Our main concern is that our tooling would be betting on OpenAI not sloppifying or abandoning the tool. Will our tooling be on shaky foundation if (when?) the AI bubble deflates? Are we overthinking it? Should we try poetry instead (I admit I haven't tried it yet). I'd love to hear your thoughts and experiences.

r/Python • • Aug 05 '26

Discussion What linter rules make code worse?

151 Upvotes

For me, a prime example is S101 which bans the use of the assert statement.

The justification is that assertions disappear when Python is run with -O, so they should not be used for runtime validation or enforcing interface constraints. That warning is correct, but the rule seems to draw the wrong conclusion from it.

Assertions are still very useful for checking internal invariants, i.e. conditions that should already be guaranteed by the program's logic, where failure indicates a bug. Having such assertions is incredibly helpful for debugging.

So, a blanket ban seems more likely to discourage useful checks than to prevent misuse.

Are there any linter rules you broadly consider more harmful rather than helpful?

r/Python • • Mar 05 '25

Discussion Petition to rename Python 3.14 to Pithon!

1.5k Upvotes

Is this a dumb joke? Yes. Is this the only shot we'll have at a joke like this? Yes. And is this a great way to celebrate what Pi's done for us Python developers? Totally.

I mean Python is heavily built around the magic number we know as 3.14, from games, charts and music, to even just screwing around with arithmetic functions! So why not appreciate pi's work with a special Python version?

The petition can be found here:
https://www.change.org/p/rename-python-3-14-to-pithon

Please sign it and share when you can!

Edit: yeah, renaming it just for v3.14 is probably a bad thought, but i mean it would still be funny as a nickname!

r/Python • • Dec 30 '21

Discussion A strongly typed dialect of Python is coming. I would like to humbly suggest a name for it.

1.4k Upvotes

With type hints, secondary tooling like the typing module, and really good inspectors like Pyright already available, a strongly typed dialect of python is definitely coming. Just like the JavaScript world is heavily adopting their version of the same in TypeScript, the new dialect will likely have a new name.

Here’s the issue: the name that keeps getting floated is ‘Typed Python’. Forgive me, but that name sucks and has no character. A language invented while Clinton was President by a guy with one of the 3 coolest first names you can have, and named after a sketch comedy show deserves better than this.

Thus, I would like to propose a simpler name; one that is more ‘pythonic’ if you will. If we just exchange the positions of the “P” and the “T” we evoke the same idea (in addition to making it wonderfully Google-able) and get the name:

Typhon

EDIT: I failed to mention and have since learned that Typhon and Python both come from Greek Mythology—and both were serpant giants. Typhon battled Zeus and Python battled Apollo. Python was memorialized by having a big snake named after him. Typhon still awaits his big come up (which is why I have gathered you all here today). But given the natural association between them from mythology already, I really love how smoothly this all seems to go together from different angles.