Re: Dependency injection: overriding defaults

2018-02-01 Thread dieter
Kushal Kumaran writes: > Victor Porton writes: >> dieter wrote: > ... >>> I would distinguish between the common library and distinct >>> applications (command line utility, daemon). The applications >>> configure the logging system (differently) while the library uses >>> uniform logging calls.

Re: Dependency injection: overriding defaults

2018-02-01 Thread Kushal Kumaran
Victor Porton writes: > dieter wrote: > >> Victor Porton writes: >> >>> I am writing a library, a command line utility which uses the library, >>> and a I am going to use dependency_injector package. >>> >>> Consider loggers: >>> >>> For the core library the logger should default to stderr. >>>

Re: Dependency injection: overriding defaults

2018-02-01 Thread Victor Porton
dieter wrote: > Victor Porton writes: > >> I am writing a library, a command line utility which uses the library, >> and a I am going to use dependency_injector package. >> >> Consider loggers: >> >> For the core library the logger should default to stderr. >> >> For the command line utility, we

Re: Dependency injection: overriding defaults

2018-01-31 Thread dieter
Victor Porton writes: > I am writing a library, a command line utility which uses the library, and a > I am going to use dependency_injector package. > > Consider loggers: > > For the core library the logger should default to stderr. > > For the command line utility, we use the default logger of

Advice on where to define dependency injection providers

2018-01-31 Thread Victor Porton
I define ExecutionContext in xmlboiler.core.execution_context module. ExecutionContext is meant to contain a common "environment" suitable for different kinds of tasks. Currently ExecutionContext contains a logger and a translator of messages: class ExecutionContext(object): def __init__(se

Dependency injection: overriding defaults

2018-01-31 Thread Victor Porton
I am writing a library, a command line utility which uses the library, and a daemon which uses the library. I am going to use dependency_injector package. Consider loggers: For the core library the logger should default to stderr. For the command line utility, we use the default logger of the

mush 2.7 released! - Type-based dependency injection for scripts

2017-09-07 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release includes: - Add support for using Python 3 type annotations to specify require

mush 2.4.0 released! - Type-based dependency injection for scripts

2016-11-17 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release includes: - Add support for cloning depending on what label was used t

mush 2.0 released! - Type-based dependency injection for scripts

2015-12-11 Thread Chris Withers
Hi All, I'm very happy to announce a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release is a re-write dropping all the heuristic callable ordering in favour of buildi

Re: Dependency Injection

2015-04-11 Thread Steven D'Aprano
On Sat, 11 Apr 2015 04:50 pm, Palpandi wrote: > Hi all, > > Can anyone explain about the dependency injection concept in python? > > I have a class A. A is used in all other classes(B, C, D, ..). Is it good > to use dependency injection concept in this situation or else any o

Dependency Injection

2015-04-10 Thread Palpandi
Hi all, Can anyone explain about the dependency injection concept in python? I have a class A. A is used in all other classes(B, C, D, ..). Is it good to use dependency injection concept in this situation or else any other suggestions? Thanks in advance. -- https://mail.python.org/mailman

mush 1.2 released! - Type-based dependency injection for scripts

2013-12-11 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release rounds out a some more rough edges after even more real world use: - The &#x

mush 1.1 released! - Type-based dependency injection for scripts

2013-11-27 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release rounds out a few rough edges after a few months of real world use: - Runner

mush 1.0 released! - Type-based dependency injection for scripts

2013-10-29 Thread Chris Withers
Hi All, I'm very happy to announce the first public release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. For a worked example of how to use Mush to reduce the copy'n'paste in your