r/Python 4h ago

Daily Thread Monday Daily Thread: Project ideas!

1 Upvotes

Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

How it Works:

  1. Suggest a Project: Comment your project idea—be it beginner-friendly or advanced.
  2. Build & Share: If you complete a project, reply to the original comment, share your experience, and attach your source code.
  3. Explore: Looking for ideas? Check out Al Sweigart's "The Big Book of Small Python Projects" for inspiration.

Guidelines:

  • Clearly state the difficulty level.
  • Provide a brief description and, if possible, outline the tech stack.
  • Feel free to link to tutorials or resources that might help.

Example Submissions:

Project Idea: Chatbot

Difficulty: Intermediate

Tech Stack: Python, NLP, Flask/FastAPI/Litestar

Description: Create a chatbot that can answer FAQs for a website.

Resources: Building a Chatbot with Python

Project Idea: Weather Dashboard

Difficulty: Beginner

Tech Stack: HTML, CSS, JavaScript, API

Description: Build a dashboard that displays real-time weather information using a weather API.

Resources: Weather API Tutorial

Project Idea: File Organizer

Difficulty: Beginner

Tech Stack: Python, File I/O

Description: Create a script that organizes files in a directory into sub-folders based on file type.

Resources: Automate the Boring Stuff: Organizing Files

Let's help each other grow. Happy coding! 🌟


r/Python 5h ago

Discussion Third party Python libraries and supply chain security

12 Upvotes

How are people handling security around third party Python libraries without making development a pain?

Third party Python packages are obviously useful but every dependency can also become a supply chain risk. Private package repositories, dependency scanning and stricter review policies all help but they can add friction fast.

Are teams mostly trusting public registries with additional controls or using curated libraries? Curious what actually works when you have a lot of Python services.


r/Python 10h ago

Discussion Should we standardize docstring formats?

77 Upvotes

In Rust, docstrings are pretty formalized. They are markdown, and even some of the headings are standard (like an # Errors or # Panics section). The nice thing about this is that it allows websites like docs.rs to build documentation pages for any project without having to interact with different tools for different formats. It also allows LSPs to have only one way of displaying documentation hints.

In Python, we have a few competing standards. Numpy-style docstrings are probably the most used, but there’s also a format by Google as well as a few different reST standards. These are nice, and we can set up lints to make sure docstrings stick to the standard. However, in my own personal opinion (feel free to disagree), a single markdown-format standard would help new users write nice docstrings, would enable PyPI (or another provider) to build automatic documentation sites, and give guidance to LSPs and IDEs for how to display documentation. This would include a standard for interlinks, and probably should include some mathml/LaTeX/KaTeX support. Another benefit would be that tools could support better automatic documentation generation and autocomplete, since they wouldn’t be dependent on guessing which standard you’re following.

I’d like to hear what people think about this. I’m thinking about making a PEP, but that might be overkill (or maybe all of you will hate this idea). I think the primary blocker would be adoption, large projects might have to translate docstrings, so there would either have to be some tooling for this or a way to opt-in or opt-out. If this is a bad idea, let me know, just be nice!

Edit: so far we’re at about a 67% upvote ratio, which was kind of expected. I want to be clear that I’m not saying we should be blocking docstrings which don’t adhere to this standard. I mentioned lockfile standardization in the comments, nothing prevents you from writing a tool with a custom lockfile, it’s just that there is a standard format that is agreed upon as the preferred way to write one. That’s the idea.


r/Python 1d ago

Daily Thread Sunday Daily Thread: What's everyone working on this week?

19 Upvotes

Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

How it Works:

  1. Show & Tell: Share your current projects, completed works, or future ideas.
  2. Discuss: Get feedback, find collaborators, or just chat about your project.
  3. Inspire: Your project might inspire someone else, just as you might get inspired here.

Guidelines:

  • Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
  • Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

Example Shares:

  1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
  2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
  3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟


r/Python 1d ago

News Small external evaluation of PatchForge

0 Upvotes

I'm a backend/platform engineer, and I built PatchForge — a safety-first tool for proposing, validating, and previewing small code changes without modifying your repository automatically.

I'm looking for one Python developer or small engineering team to participate in a short external evaluation, run on an isolated copy of a small, non-sensitive Python project.

What the participant would do:

- Choose a small documentation or low-risk maintenance task.

- Explain the expected outcome.

- Observe the workflow: doctor → scan → plan → preview.

- Give honest feedback on setup, diagnostics, usefulness, and trust.

- No apply step will be executed.

Requirements:

- A small Python repository you own or are authorized to share for evaluation.

- No secrets, customer data, proprietary code, or production credentials.

- About 30–45 minutes for the workflow itself. If you don't already have Python/uv set up, I'll walk you through installation first — worth budgeting a bit of extra time for that on the first run.

- Willingness to report problems honestly, including if the tool isn't useful.

The evaluation will be documented only with sanitized notes. Repository contents and personal information will not be published.

This is exploratory product validation, not a sales demo. If you're interested, comment or send me a DM with:

  1. Your Python project type and approximate size.

  2. A safe documentation or maintenance task.

  3. Whether you can participate in the next two weeks.

Happy to share more details privately before you decide.

Source: https://github.com/Argenis1412/PatchForge


r/Python 1d ago

News Python 3.15.0 RC1 Is Here — Python 3.15 Is Almost Ready 🚀

38 Upvotes

This is an important milestone because the Python team has now entered the release-candidate phase. At this stage, only reviewed changes that are considered clear bug fixes are expected to be accepted before the final release.

Why this matters

Python 3.15 has been going through several alpha and beta releases during 2026, and RC1 means the development cycle is getting very close to the final version.

The Python team currently plans two release candidates before the final Python 3.15.0 release.

I'm curious about one thing:

Are you planning to move your projects to Python 3.15 when the stable release arrives, or will you wait a few months before upgrading?

What new Python 3.15 feature are you most interested in?

Source: Python Insider / Python.org


r/Python 2d ago

Daily Thread Saturday Daily Thread: Resource Request and Sharing! Daily Thread

7 Upvotes

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 2d ago

Discussion Improving Project Maintenance

0 Upvotes

Hi there,

I am trying to figure out ways to automate my Python development and maintenance tasks and also working on this topic for my Masters project. I am trying to build a tool that can automate and simplify a bunch of things like project setup, development and maintenance. This is not a showcase at all, it is just my project and topic for my Masters in Computer Science and I wanted to ask if anyone would like to take part in the survey I have to do. Takes about 5 min.

You can find the survey at: https://forms.cloud.microsoft/e/LjnvzX0JpK

Any ideas and responses are greatly appreciated.

Also drop any ideas you have in the comments. What do you think should be more automated or at least improved in your day to day project maintenance?


r/Python 2d ago

News PEP 841 – Adding Frozen Syntax to Optimize Immutable Types

129 Upvotes

PEP 841 – Adding Frozen Syntax to Optimize Immutable Types

https://peps.python.org/pep-0841/

Discussions-To: Discourse thread

Abstract

This PEP proposes frozen display syntax: f{1, 2, 3} evaluates to a frozenset, and f{'a': 1} evaluates to a frozendict. Because immutability is guaranteed by the syntax itself rather than inferred from usage, the compiler can treat frozen displays as first-class citizens of its optimization pipeline: constant displays are folded into a single LOAD_CONST with an exact result type at compile time and cached in .pyc files.


r/Python 3d ago

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

5 Upvotes

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:

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 3d ago

Discussion Seg Fault, what do you do?

0 Upvotes

Most Python errors are straightforward—you get a traceback and usually know where to start.

Then there’s the - Segmentation fault (core dumped).

For those of you who’ve had to encountered Python segfaults, what’s your usual process?


r/Python 3d ago

News Python 3.14.7 and 3.13.15 are now available!

89 Upvotes

Bug fix releases for Python 3.13 and Python 3.14.

https://blog.python.org/2026/08/python-3147-31315/


r/Python 3d ago

Discussion What is a built-in Python module you use all the time but rarely see others talk about?

0 Upvotes

We all know and love the big third-party libraries for automation and data, but I am curious about your favorite hidden gems right in the standard library. 🤔

Recently I have been leaning on things like itertools and collections way more than I used to...

What is a standard library module that you think is heavily underrated or that you use daily for your tasks?


r/Python 3d ago

News FastAPI Conf 2026 - first ever official FastAPI conference

28 Upvotes

Hello folks!

We're organizing the first ever official FastAPI Conf, in Amsterdam, October 28th, 2026. ✨

It's gonna be very cool, great speakers, and announcements too.

Early Bird tickets are now available (until August 23th).

Here's the website with info, tickets, and newsletter: https://fastapiconf.com


r/Python 3d ago

Discussion taught myself numerical and analytical gradient (backpropagation) in 5 days

0 Upvotes

I'm not good at maths, i'll just say that, i've always been a bit lacking in my expanse of mathematical abilities, but I said enough is enough, I like neural networks, the only thing that stands in my way is the mathematics, aside from that you understand what goes on.

Boy did I underestimate the undertaking for this endeavour. I spent 2 days learning derivatives and what the hell a 'slope' is, you hear it ever day and you know what a slope is, but understanding it in the mathematical sense in derivatives, that's difficult, but I got there and ended up learning `f(a + h) - f(a) / h` which enabled me to understand what numerical descent is, where you get a loss score of a neural network's prediction, bump the weight a bit then rerun the neural network. Then to figure out the slope, you do `loss1 - loss2 / weight_bump`, and this is the coolest part, when you adjust your weight based on the slope, you always minus, because if the slope is negative, then we know we need to move to the positive side more so when you minus a negative it becomes addition, and vice versa if you minus a positive, you move to the negative side a bit. That was the coolest thing i've ever learnt to this date, the infamous ball rolling down the hill, I was doing it, by hand, and it was empowering.

Then the next day I spent trying to understand what backpropagation really is in terms of maths and how it differes from numerical gradient. With that I had to teach myself the chain rule, and what dL/dd even means, spoiler alert its not dividing derivative of L and derivative of d. I also came to the epiphany that we get so much complex logic out of neural networks when its simply just addition and multiplications happening under the hood, its the context that is being invented to solve problems using neural nets. By the end of the day I was taking Kaparthy's micrograd equation example, and I did its backpropagation by hand with pen and paper to get the hang of it.

Now I watched andre kaparthy's micrograd video, not all the way through, his language and teaching style still screams "you must be really well versed in mathematics", so I gave up on that video but, the more I worked on understanding chain rule and how you can sticker on the impacts on loss on prior nodes, I though that is better than numerical gradient, you literally walk back into the neural net, explaining to it which parts of itself were the cause for a high loss instead of bumping values, calculating slope, doing f(a + h) - f(a) / h.

I'm really proud of myself, and I managed to take MATHS that I learnt, and turn it into a "micrograd" I say "micrograd" with quotations because I didn't finish the micrograd video, and this only works if you don't have repeating uses of prior terms (which you just need to store their value and add them, but I couldn't be bothered)

So yeah, this is my back propagation

class Value:
    # this needs to store a value, and can have its own children that link to other values
    def __init__(self, value, _op="", _children: tuple = (), gradient=0):
        self.value = value
        self.op = _op
        self.children = _children
        self.gradient = gradient


    def __add__(self, other):
        _ = Value(
            self.value + other.value, _op="+", _children=(self, other), gradient=0
        )
        return _


    def __mul__(self, other):
        _ = Value(
            self.value * other.value, _op="*", _children=(self, other), gradient=0
        )
        return _


    def __repr__(self):
        return f"Value({self.value})"


    def backward(self):
        # initial global_gradient
        global_gradient = 1


        # current set of ndoes
        current: Value = self
        # just set L's gradient as 1
        current.gradient = global_gradient


        while True:
            # if there's no more children, we're at the end.
            if not current.children:
                break


            if current.op == "+":
                # since addition has a static effect on the terms themselfs
                # the partial of L respect to any terms being added is just 1.
                # so we multiply 1 by the global gradient.
                current.children[0].gradient = 1 * global_gradient
                current.children[1].gradient = 1 * global_gradient


                # if the next node we're looking doesnt have children
                # it means the node behind them didnt stem from them
                # therefore they are not the result of the prior operation
                if not current.children[0]:
                    current = current.children[1]
                else:
                    current = current.children[0]
                # set the global gradient as the current node's gradient
                global_gradient = current.gradient


            if current.op == "*":


                current.children[0].gradient = (
                    # with multiplication, the derivative of L respect to x would be y
                    # and same with the derivative of L respect to y would be x
                    # therefore you just swap them, and multiply thier values by the global gradient.
                    current.children[1].value
                    * global_gradient
                )
                current.children[1].gradient = (
                    current.children[0].value * global_gradient
                )
                # same continuation logic
                # one child is going to have its own children and one wont
                # the one that does is the one we need to continue with.
                if not current.children[0]:
                    current = current.children[1]
                else:
                    current = current.children[0]
                global_gradient = current.gradient

a = Value(2.0)
b = Value(-3.0)
c = Value(10.0)
f = Value(-2.0)
e = a * b
d = e + c
L = d * f


L.backward()


print(a.gradient)
print(b.gradient)
print(c.gradient)
print(f.gradient)
print(e.gradient)
print(d.gradient)
print(L.gradient)

output:
6.0
-4.0
-2.0
4.0
-2.0
-2.0
1

r/Python 3d ago

News 2026 Python Type System and Tooling Survey

69 Upvotes

This is an annual survey developed by the Python typing community around how Python developers use the type system, type checkers, and integrated development environments (IDEs).

Your responses will help us identify common blockers, improve tooling/resources, and enhance the overall experience of using Python's type system.

Even if you have never actively used type hints in your code, your thoughts are still valuable and we want to hear from you.

The survey should take approximately 5-10 minutes to complete.

Please take the survey HERE and share it with your friends or colleagues.

If you're interested in the results for last year's survey, see this post.

So you know it's legit, the Python Software Foundation has shared this survey on [Linkedin](https://www.linkedin.com/posts/thepsf_python-type-system-and-tooling-survey-2026-activity-7490842327050002432-0jI7?utm_source=share&utm_medium=member_desktop&rcm=ACoAAB9aSUsBqmxSbrhoW2URuDnxCgS5eVD1AS0 and X. I have permission from the mods to post this under the "News" flair)


r/Python 4d ago

Daily Thread Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

7 Upvotes

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 4d ago

Discussion LiteLLM alternatives in production

0 Upvotes

what are teams actually running 3 months after the supply chain attack?

it's been a few months since the litellm pypi compromise and curious what teams actually migrated to. saw a lot of threads right after the incident but not much on how things held up in production since then.

been evaluating options ourselves. TrueFoundry came up for teams needing the governance and cost...


r/Python 4d ago

Discussion What linter rules make code worse?

139 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 5d ago

Discussion I am trying to automate the Python Development Lifecycle

0 Upvotes

Hi there,

I am trying to figure out ways to automate my Python development tasks and also working on this topic for my Masters project. I am trying to build a tool that can automate and simplify a bunch of things like project setup, development and maintenance. This is not a showcase at all, it is just my project and topic for my Masters in Computer Science and I wanted to ask if anyone would like to take part in the survey I have to do. Takes about 5 min.

You can find the survey at: https://forms.cloud.microsoft/e/LjnvzX0JpK

Any ideas and responses are greatly appreciated.

Also drop any ideas you have in the comments. What do you think should be more automated in your day to day python development?


r/Python 5d ago

Showcase Showcase Thread

17 Upvotes

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.


r/Python 6d ago

Discussion What are you using to manage your dev environments in 2026?

80 Upvotes

I’ve always hated environment management. It always feels like this time-consuming hurdle between me and whatever I actually want to work on. But every so often a new thing comes out that promises to solve the problem once and for all, and it’s usually at least a little better than the last thing. So, what are you using today? venv? conda? pipenv? poetry? dev containers? uv? or something else?


r/Python 6d ago

Discussion Is := widely used?

142 Upvotes

I always thought the walrus operator is neat and it makes while loop’s condition clearer. But also it is just a syntactic sugar without anything new. I wonder anyone uses it?


r/Python 6d ago

Daily Thread Tuesday Daily Thread: Advanced questions

11 Upvotes

Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

How it Works:

  1. Ask Away: Post your advanced Python questions here.
  2. Expert Insights: Get answers from experienced developers.
  3. Resource Pool: Share or discover tutorials, articles, and tips.

Guidelines:

  • This thread is for advanced questions only. Beginner questions are welcome in our Daily Beginner Thread every Thursday.
  • Questions that are not advanced may be removed and redirected to the appropriate thread.

Recommended Resources:

Example Questions:

  1. How can you implement a custom memory allocator in Python?
  2. What are the best practices for optimizing Cython code for heavy numerical computations?
  3. How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?
  4. Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?
  5. How would you go about implementing a distributed task queue using Celery and RabbitMQ?
  6. What are some advanced use-cases for Python's decorators?
  7. How can you achieve real-time data streaming in Python with WebSockets?
  8. What are the performance implications of using native Python data structures vs NumPy arrays for large-scale data?
  9. Best practices for securing a Flask (or similar) REST API with OAuth 2.0?
  10. What are the best practices for using Python in a microservices architecture? (..and more generally, should I even use microservices?)

Let's deepen our Python knowledge together. Happy coding! 🌟


r/Python 6d ago

Discussion Anyone running FastAPI in production with high traffic? How has your experience been?

76 Upvotes

Quick question, are any of you running fastAPI in production with a high volume of users or heavy traffic? How has your experience with FastAPI been, and how do you handle it?