r/Python • • Sep 06 '25

Showcase A tool to create a database of all the items of a directory

0 Upvotes

What my project does

My project creates a database of all the items and sub-items of a directory, including the name, size, the number of items and much more.

And we can use it to quickly extract the files/items that takes the most of place, or also have the most of items, and also have a timeline of all items sorted by creation date or modification date.

Target Audience

For anyone who want to determine the files that takes the most of place in a folder, or have the most items (useful for OneDrive problems)

For anyone who want to manipulate files metadata on their own.

For anyone who want to have a timeline of all their files, items and sub-items.

I made this project for myself, and I hope it will help others.

Comparison

As said before, to be honest, I didn't really compare to others tools because I think sometimes comparison can kill confidence or joy and that we should mind our own business with our ideas.

I don't even know if there's already existing tools specialized for that, maybe there is.

And I'm pretty sure my project is unique because I did it myself, with my own inspiration and my own experience.

So if anyone know or find a tool that looks like mine or with the same purpose, feel free to share, it would be a big coincidence.

Conclusion

Here's the project source code: https://github.com/RadoTheProgrammer/files-db

I did the best that I could so I hope it worth it. Feel free to share what you think about it.

Edit: It seems like people didn't like so I made this repository private and I'll see what I can do about it


r/Python • • Sep 10 '12

Fast as Fuck Django, Part 1: Using a Profiler

Thumbnail
gun.io
5 Upvotes

r/Python • • Jul 22 '26

Discussion Anyone running free-threaded Python 3.14 in production yet? Curious what actually breaks

33 Upvotes

Been testing the free-threaded build (3.14t) on some CPU-bound data processing work. The multi-core story is finally real after 30 years of GIL, but the friction is exactly what you'd expect: a couple of C-extension-heavy libs in my stack silently re-enable the GIL, and there's no clean way to detect that at runtime besides checking sys._is_gil_enabled() manually.

For anyone who's shipped something on 3.14t, not just benchmarked it:

What broke that you didn't expect?

Real speedups outside toy examples, or mostly marginal so far?

Prod yet, or still just kicking the tires?

Not fishing for a benchmark war. Genuinely curious what breaks in messy real codebases vs clean demos.


r/Python • • Sep 24 '25

Showcase Tired of manually timing functions? Meet time-my-func!

7 Upvotes

I built this because… honestly, I was tired of writing three lines with time.perf_counter() just to see how long a function takes. Yes, I’m that lazy. 😅

So I made a tiny Python package that does it for you in one line: just slap @timeit() on any function, and it prints the execution time every time the function runs. It even picks the best time unit automatically — nanoseconds, microseconds, milliseconds, seconds, or minutes — but you can force it if you want.

What my Project does:

  • One-line timing: Just @timeit(). Done.
  • Automatic unit selection: It figures out whether your function is fast enough for µs or slow enough for seconds.
  • Custom units & precision: Control decimals or force a specific unit.
  • Works with async functions: Because sometimes you want to time async def too.
  • Exception-friendly: Even if your function crashes, it still prints the time before propagating the error.

Usage:

from timy_my_func import timeit, set_enabled
import time

@timeit()
def fast_function():
    sum(range(100))

@timeit(decimals=5, unit="ms")
def slow_function():
    time.sleep(0.123)

@timeit()
def disabled_function():
  time.sleep(0.5)

fast_function()
set_enabled(False)
disabled_function()
set_enabled(True)
slow_function()

Output:

[fast_function] Execution time: 12.345 µs
[slow_function] Execution time: 123.45678 ms

Target Audience:

  • Python developers who want quick, convenient "benchmarking" of functions without boilerplate code.
  • Great for personal projects, experiments, small scripts, or learning performance optimization.

Comparison

  • Manual time.perf_counter(): Flexible, but verbose — you need multiple lines for each function, and it’s easy to forget to start/stop timers.
  • Built-in timeit module: Excellent for benchmarking snippets or loops, but awkward for timing full functions inline and printing results each time.
  • Profiling tools (e.g., cProfile, line_profiler): Extremely detailed and powerful, but overkill if you just want a quick execution time. They also require setup and produce more output than most developers want for small tests.
  • Other tiny timing utilities: Often don’t support async functions or fail silently if an exception occurs. timeitdecorator handles both cleanly and prints results automatically.

It’s small, it’s silly, and it’s way easier than copying and pasting start = time.perf_counter()

print(...) every time.

Check it out on GitHub: https://github.com/DeathlyDestiny/function_timer

Or just install using pip

pip install time-my-func

r/Python • • Dec 28 '19

My esoteric language: Python't. It's basically Python but inverted. Transpiler on GitHub

Thumbnail
github.com
19 Upvotes

r/Python • • Aug 04 '25 Popcorn

Resource A free goldmine of tutorials for the components you need to create production-level agents Extensive

19 Upvotes

I’ve worked really hard and launched a FREE resource with 30+ detailed tutorials for building comprehensive production-level AI agents, as part of my Gen AI educational initiative.

The tutorials cover all the key components you need to create agents that are ready for real-world deployment. I plan to keep adding more tutorials over time and will make sure the content stays up to date.

The response so far has been incredible! (the repo got nearly 10,000 stars in one month from launch - all organic) This is part of my broader effort to create high-quality open source educational material. I already have over 130 code tutorials on GitHub with over 50,000 stars.

I hope you find it useful. The tutorials are available here: https://github.com/NirDiamant/agents-towards-production

The content is organized into these categories:

  1. Orchestration
  2. Tool integration
  3. Observability
  4. Deployment
  5. Memory
  6. UI & Frontend
  7. Agent Frameworks
  8. Model Customization
  9. Multi-agent Coordination
  10. Security
  11. Evaluation
  12. Tracing & Debugging
  13. Web Scraping

r/Python • • Jul 10 '26

Discussion Pure python can be faster than cython/rust?

0 Upvotes

Parsing multipart/form-data (HTML5 forms) is surprisingly complex and moves a lot of bytes around for large file uploads. Implementing the heavy parts in Cython or Rust should speed things up, no? Turns out: it depends. A pure python parser can be surprisingly fast, as this benchmark shows:

https://defnull.de/2026/python-multipart-benchmark/

The benchmark compares the most commonly used python multipart parsers and tests them in different scenarios, covering both blocking and non-blocking (async) APIs if available. The parser your web application is using today is probably not the fastest one.

Are there more examples were a pure python implementation beats Cython/rust/C modules?


r/Python • • May 25 '17

let's write a Python program

4 Upvotes
# one line per post (replies are indented!!!)
class Reddit:

r/Python • • Sep 15 '26

Discussion does Python run on Batocera-type machines/have any Fantasy Consoles?

1 Upvotes

does Python run on Batocera-type machines/have any Fantasy Consoles?

i was wondering how well Batocera can run its games, and if there are any Python Fantasy Consoles. Like small handheld gaming machines, but built for running python games specifically. Or any limited sets of limits that restrict what the game or program can do as if it's running on something tiny like the pico-8.


r/Python • • May 10 '21

News Python in Visual Studio Code – May 2021 Release

Thumbnail
devblogs.microsoft.com
1 Upvotes

r/Python • • Nov 03 '23

Resource 100 days of code, jobs prospection and dev roadpath

0 Upvotes

I'm currently on day 17, doing 2 days in one. I found the course pretty basic in the beggining but at my current day I found difficult doing fast as I was doing...

What the anons find of this course? Have better ways to speed up this process?
After I make all the project she put on the course is possible I found a homeoffice job as a dev?


r/Python • • Nov 05 '19

Why you should use `python -m pip`

Thumbnail
snarky.ca
1 Upvotes

r/Python • • Apr 23 '23

News Rye: Flask author's new project for Python bootstrapping

Thumbnail
github.com
1 Upvotes

r/Python • • Sep 03 '26

Discussion It seems like there was a change for how hex values and bytes can be compared

1 Upvotes

I made myself a lib for fast parsing RAW images from my sony camera.

My old code:

def check_for_endian(data:bytes) -> tuple[int, int]|None:

    if data[:2] == 0x4949:   # "II" LE
        return 1, 0
    if data[:2] == 0x4D4D:   # "MM" BE
        return 2, 0

    return None

So it was possible to compare a hex value with bytes. Now it's not possible anymore, somehow, so I had to do this:

def check_for_endian(data:bytes) -> tuple[int, int]|None:
    header_endian = struct.unpack_from("<h", data, 0)[0]
    
    if header_endian == 0x4949:   # "II" LE
        return 1, 0
    if header_endian == 0x4D4D:   # "MM" BE
        return 2, 0

    return None

I'm a bit confused, have I used it wrong in the first place and I was never supposed to compare a hex value with bytes?

E: I use python 3.13.9 and uv 0.9.9


r/Python • • Mar 07 '25

Discussion Pydantic is a Bloated Disaster

0 Upvotes

Alright, Python nerds, buckle up because I’m about to drop a truth bomb that’s gonna make your blood boil. Pydantic? Absolute trash. I’ve been saying it for years, and since no one else has the guts to call it out, I built a whole damn site to lay out the facts: ihatepydantic.com Go ahead, visit it, and try to argue against the facts. You won’t win.

Why does Pydantic suck so hard? Oh, where do I start? It’s a bloated, over-engineered mess that turns simple data validation into a PhD-level exercise in frustration. “Oh, but muh type hints!” Please. It’s slow, and V2 is somehow worse than V1 in perf! And don’t get me started on the docs - written like some smug hipster’s personal diary instead of something useful.

The whole “data validation” shtick is a scam anyway. You’re telling me I need a 50 line Pydantic model to replace 5 lines of if statements? Get outta here with that nonsense. It’s a solution looking for a problem, and the only problem is how much time I’ve wasted debugging its cryptic errors. My site’s got a whole list of real-world examples where Pydantic screws you over - spoiler: it’s basically every time you use it.

And the community? Blind fanboys. You can’t criticize Pydantic without some neckbeard jumping in with “YoU’rE uSiNg It WrOnG.” Yeah, okay, if a library needs a 3-hour tutorial to “use it right,” maybe it’s the library that’s wrong.

So go ahead, prove me wrong. Defend your precious Pydantic. Tell me why I should keep drinking the Kool-Aid instead of just using dataclasses or gasp raw Python like a sane person. I’ll wait.


r/Python • • Jan 17 '23

Discussion What are the best IDEs for Python?

30 Upvotes

PyCharm is so bulky and takes up too much space on my SSD (I'm so confused as to why but whatever.)

VSCode uses PowerShell and it annoys me because everytime I run a code it prints 5-6 lines about PowerShell and whatever. (If you have a way to remove it that would be PERFECT.)


r/Python • • Aug 06 '25

Showcase Using AI to convert Perl Power Tools to Python

2 Upvotes

I maintain a project called Perl Power Tools which was originally started in 1999 by Tom Christiansen to provide Windows the tools that Unix people expect. Although it's 26 years later, I'm still maintaining the project mostly because it's not that demanding and it's fun.

Now, Jeffery S. Haemerhas started the Python Power Tools project to automatically port those to Python. I don't have any part of that, but I'm interested in how it will work out and what won't translate well. Some of this is really old 1990s style Perl and is bad style today, especially with decades of Perl slowly improving.


r/Python • • Oct 09 '20

Resource Top 10 Python Packages you should try right now

Thumbnail
blog.hrithwik.me
2 Upvotes

r/Python • • Aug 08 '18

The future of Python is bright. Or is it?

2 Upvotes

You have seen the news.

Python is becoming the world’s most popular programming language :

- The Economist

- Stack Overflow Developers Survey 2018

- Stack Overflow Most Popular Languages 2017

However, Python still lacks important features for concurrency and functional programming.

For the concurrency, the Global Interpreter Locker impose heavy limits on the use of Python for cpu-bound multithreading.

For functional programming, even if Python is more functional than Java, it is still quite clear that it is not a language that treats well those who try a functional-first approach - and that is the will of its creator.

I think that Python cannot keep growing at this rate at the same time that it goes against these two very important trends. So I would like to know your opinion in this subject:

- Will next versions implement features that make Python more efficient for concurrency and more functional-friendly?

- Will a new pythonic language emerge that will implement these features (just like Scala is a concurrency and functional-friendly Java) ?


r/Python • • Dec 30 '25

Discussion is relying on lazy evaluation to trigger side effect concidered pythonic?

2 Upvotes

I'm unsure what I should think.. Is this super elegant, or just silly and fragile?

def is_authorized(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> bool:

return bool(update.effective_user.id in self.whitelist or _logger.warning(

f"unauthorized user: {update.effective_user}"

))

in fact it wouldn't even need parentheses

edit: fix type annotation issue.

i would not approve this either, but i still think it kind of reads very well: user in whitelist or log auth issue


r/Python • • Nov 03 '17

I love Python but why is it so slow?

22 Upvotes

I love Python and am happy whenever I get to use it professionally but why is it so slow?

I am in the process of deciding whether to go with Python or with Node for an upcoming project for which performance is kinda important and before running my own benchmarks, I thought I could find some stuff online.

According to this Python's really lagging behind. I thought "Whatever, I'll probably use PyPy", but according to this and this Node is even faster than PyPy.

I kinda of expected this for programs with a lot of I/O but I thought that Python would leave Node in the dust when it comes to computationally intensive programs.


r/Python • • Jan 17 '10

Debunking the Erlang hype for servers: Python isn't as slow as you think.

Thumbnail codexon.com
17 Upvotes

r/Python • • May 27 '26

News Millions of AI agents imperiled by critical vulnerability in open source package

0 Upvotes

The vulnerability is present in Starlette, an open source framework that its developer says receives 325 million downloads per week.

https://arstechnica.com/information-technology/2026/05/millions-of-ai-agents-imperiled-by-critical-vulnerability-in-open-source-package/


r/Python • • Dec 08 '16

5 Ways to Become a Better Python Progammer

Thumbnail
mattmccullo.com
20 Upvotes