nprofile1qyt8wumn8ghj7un9d3shjtnyd968gmewwp6kytcqyr3vqzk8z4hw4vamzel803pqcn9n624fse87pke0v4900swk08vc6yxr7tk (nprofile…r7tk) That would depend on the size of the project. For small ones I would just write a single one, something like DBClient() and put all the things talking to the db there. And then had a business logic service like BlogService() that would take the client as an argument. The upside for that is that for example in tests for the BlogService() you can use another client like InMemoryClient() and have tests without the need to configure a test db.
For larger project yes, I would have something like BlogPostDBClient() with methods like save_blog_post() and read_blog_post()
I wrote about this approach in a blog post:
https://stfn.pl/blog/62-python-dependency-injection/
