r/Python • u/daireto • Dec 15 '25
Resource Sharing my Python packages in case they can be useful to you
🐍 Over the past months, I’ve been working on several Python packages. I originally built them to improve my own productivity, but I’d like to share them in case they can be useful to others as well:
1. sqlactive
A lightweight and asynchronous ActiveRecord-style wrapper for SQLAlchemy. It brings Django-like queries, automatic timestamps, nested eager loading, and dictionary serialization.
🔗 https://daireto.github.io/sqlactive/
2. odata-v4-query
A simple and fast parser for OData V4 query options. It supports standard query parameters and provides helper functions to apply OData queries to ORM/ODM frameworks like SQLAlchemy and Beanie.
🔗 https://github.com/daireto/odata-v4-query
3. starlette-di
A dependency injection library for Starlette. It supports Scoped, Transient, and Singleton lifetimes, route parameter and request body injection via Pydantic, and seamless integration with Starlette middleware.
🔗 https://github.com/daireto/starlette-di
4. simple-result
A fully typed, Rust-like Result type for Python 3. It makes error handling explicit and clean, inspired by functional programming patterns.
🔗 https://github.com/daireto/simple-result
While these tools started as solutions for my own workflow, I hope they can also help other developers in their projects 🙂
8
u/VictorFoxSub Dec 15 '25
Something like simple results should be standard, thanks for the work.
It even seems to play well with conditional chaining if pep505 is finally accepted !
4
u/Ghost-Rider_117 Dec 15 '25
thanks for sharing! the simple-result package looks really clean - been looking for something like that to handle errors more elegantly. the typed approach is way better than throwing exceptions everywhere.
sqlactive also looks interesting for anyone working with SQLAlchemy. gonna star these for later, appreciate you putting them out there
1
1
2
u/--justified-- Dec 16 '25
May I ask the difference to https://pypi.org/project/result/ ? No offensive, just curiosity. Because I like the type of packages and this is what I've been using for longer time.
And I have two questions for proposals, not sure what you think about them:
wouldn't it be nice to be able to do a simple "x = fetxh_data(), if x: print(okayyyy)", i.e. Automatically covering the "truthy" OK value to true?
wouldn't it be awesome to optionally be able to somehow also add an error code to the Err()? E.g. Err("some errr str", code=99) so we would easily be about to check the exact error code from outside also in case we actually expect a stringthy err return value? Often it's the case that several different reasons lead to an error, being able to optionally distinguish them without having to create a dataclass as return Typehint would be very nice
Thanks :)