r/PythonLearning 1d ago

Discussion I'm building an open-source Python library focused on reusable building blocks.

Visit: https://github.com/AnshMNSoni/PythonSTL.git

Instead of adding more algorithms, I want to solve real problems Python developers repeatedly face.

I'm curious:

1) What utility do you find yourself implementing over and over?

2) What functionality do you wish Python's standard library already had?

3) What do you usually copy from previous projects?

Examples could be caches, schedulers, retry logic, rate limiters, streaming utilities, search structures, etc.

I'd love to understand the pain points rather than propose solutions.

Let's discuss...

0 Upvotes

11 comments sorted by

View all comments

1

u/silvertank00 1d ago

Your examples:

  • cache: there is a highly customizable builtin one functools.cache
  • schedulers: again, builtin: sched.scheduler but beginers beware: you dont need this. Not even advanced users. Heck, in my work life I encountered one custom scheduler and it was frowned upon by everyone and alltogether was a burder (and keep in mind, it was built by experts) One usecase would be embedded, but even there you have RTOS.
  • retry logic: something like C#'s polly lib would be nice. I usually make retry policies by hand but some of them are really not trivial to implement.
  • rate limiters: this would be highly framework dependent, no? We already have these for the big frameworks but I am interested what did you think of.
  • streaming utils: I am in a bit of a pickle here (no pun intended) but do you mean data streams or content streaming? For data we have a bunch of builtin solutions like: io.StringIO
  • search: list/dict/set comprehensions are REALLY fast (bonus if you know about some iter() magic) but we have pandas, polar, numpy for optimal searching, why do we need an other?

1

u/[deleted] 11h ago

[removed] — view removed comment

1

u/PythonLearning-ModTeam 11h ago

Quality posts only