AstraBert / better-result-py
PublicYet another implementation of Rust's Result type, with type annotations and async support
better-result-py is a minimal, dependency-free Python library inspired by Rust's Result type that wraps synchronous and asynchronous functions to treat exceptions as return values rather than control flow interruptions.
How It Works
You hear about better-result-py, a simple way to make your programs handle mistakes without crashing everything.
You easily include this lightweight helper into your Python work with a quick add command.
You wrap your regular calculations or data fetches with this tool, so errors turn into useful info instead of surprises.
You peek to see if it succeeded or grab the mistake details safely, without any drama.
For tasks that take time like grabbing info from the web, you use the waiting version the same easy way.
You get the successful result or a backup plan if something went off, keeping everything smooth.
Now your code deals with problems gracefully, making it stronger and easier to manage.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.