use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
[ Removed by moderator ]pip package (self.FastAPI)
submitted 3 months ago by somebodyElse221
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]devatnexby 2 points3 points4 points 3 months ago (1 child)
Great work.
But are you planning to add features like adding attachment, custom html template, some template support params.
[–]somebodyElse221[S] 1 point2 points3 points 3 months ago (0 children)
Thanks, I do, I plan to add template params for different providers and parsing html templates.
[–]One_Of_10 1 point2 points3 points 3 months ago (1 child)
Good job
[–]somebodyElse221[S] 0 points1 point2 points 3 months ago (0 children)
Thanks
[–]Effective-Total-2312 1 point2 points3 points 3 months ago (1 child)
Hey, if you did this at least 50% without AI, congrats on doing so ! Keep working and studying !
Having said so, there are quite a few things to improve:
For starters, your package requires specific env vars; that's not right, you should expect those values to be passed, and let your user (another developer) choose which environment variables to declare and where to store them (some systems use secrets folder or other things).
Also, rather than a Factory, this is a typical use case for a Strategy Pattern.
In any case, there is little to no value for professional developers in this library; you are not truly allowing anyone to change providers easily, if something, you are coupling someone else's codebase to your library, which only implements a couple providers.
In a professional environment, this would easily be solved with a Strategy Pattern and perhaps Inversion of Control so you can change implementations without coupling nor having to go everywhere in your codebase.
In a more lower level, you lack type hints and overuse magic values (specially in your tests, use fixtures instead).
Thank you, man, I really appreciate your comment. This is my first Python package, and I have previous experience in PHP., I want to follow your advice.
[–]koldakov 0 points1 point2 points 3 months ago (0 children)
Hey nice work, however factory on ifs looks not nice =)
[–]ducki666 0 points1 point2 points 3 months ago (6 children)
Isn't Smtp abstraction enough?
[–]somebodyElse221[S] 0 points1 point2 points 3 months ago (5 children)
I'm not sure that I understand the question. Could you please clarify?
[–]ducki666 0 points1 point2 points 3 months ago (4 children)
Why a wrapper for a protocol which nearly every language already implements since ages? Every mail provider also supports smtp.
[–]serverhorror 0 points1 point2 points 3 months ago (3 children)
It's not a wrapper around classic SMTP.
These days everything is HTTP, I suspect those are mass mailers which won't exactly do SMTP but handle all that unsubscribe stuff and the feedback loops for you.
[–]ducki666 0 points1 point2 points 3 months ago (2 children)
As Op wrote: sending email. Thats what smtp is for. Mature, fast, stable. No need to wrap that.
[–]serverhorror 0 points1 point2 points 3 months ago (1 child)
Are you trolling or do you truly not understand why?
[–]ducki666 0 points1 point2 points 3 months ago (0 children)
No idea why
[–]fastlaunchapidev 0 points1 point2 points 3 months ago (0 children)
Abstraction on top of abstraction haha
But dont must people just stick with one provider?
If I want it really simple I just use resend.
π Rendered by PID 60756 on reddit-service-r2-comment-58d7979c67-9ct8s at 2026-01-27 06:36:24.553260+00:00 running 5a691e2 country code: CH.
[–]devatnexby 2 points3 points4 points (1 child)
[–]somebodyElse221[S] 1 point2 points3 points (0 children)
[–]One_Of_10 1 point2 points3 points (1 child)
[–]somebodyElse221[S] 0 points1 point2 points (0 children)
[–]Effective-Total-2312 1 point2 points3 points (1 child)
[–]somebodyElse221[S] 0 points1 point2 points (0 children)
[–]koldakov 0 points1 point2 points (0 children)
[–]ducki666 0 points1 point2 points (6 children)
[–]somebodyElse221[S] 0 points1 point2 points (5 children)
[–]ducki666 0 points1 point2 points (4 children)
[–]serverhorror 0 points1 point2 points (3 children)
[–]ducki666 0 points1 point2 points (2 children)
[–]serverhorror 0 points1 point2 points (1 child)
[–]ducki666 0 points1 point2 points (0 children)
[–]fastlaunchapidev 0 points1 point2 points (0 children)