> > Added yet another one or two parameters (sigh) to functions, but it keeps > things functional and without outside (global, thread-local) state.
This is where something like pyramid_services [1] really excels. It'll drastically cut down on concerns like that when you adopt some form of inversion-of-control pattern in your codebase. [1] https://github.com/mmerickel/pyramid_services On Fri, Sep 7, 2018 at 3:44 AM <jens.troe...@gmail.com> wrote: > Thank you Mike for the information, that all makes sense. I ended up with > the same approach that SQLA takes: a “Session” object owned by a > DataManager, joined to the Request’s TransactionManager. And then just pass > a `dbsession` and `fnsession` and `jobsession` around to functions as > needed. > > Added yet another one or two parameters (sigh) to functions, but it keeps > things functional and without outside (global, thread-local) state. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/148c7bec-2d75-4525-9aa4-3902a4a2f2cb%40googlegroups.com > <https://groups.google.com/d/msgid/pylons-discuss/148c7bec-2d75-4525-9aa4-3902a4a2f2cb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwHgc8TOpYPcJdjyPWEtPgFhqbPrWPFPUFuEYT%3DhNjWZ0A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.