Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
While dependency injection is easy to do in Python due to its support for keyword arguments, the ease with which objects can be mocked and its dynamic nature, a framework for assisting in this process can remove a lot of boiler-plate from larger applications. That's where Injector can help. It automatically and transitively provides dependencies for you. As an added benefit, Injector encourages ni
PythonでDIする 需要はなさそうですが、たまたまPythonでDIする方法を調べたので、、、 いくつかの選択肢 Injector (ドキュメントはこちら) Inject (日本語の記事がありました) siringa(ドキュメントはこちら) di-py Injectは2015年で開発が止まっているようです。 di-pyはあまりドキュメントが充実していないようです。 siringaは型ヒントをごにょごにょしてInjectするちょっと変態チックなやり方だったので避けました。 消去法でInjectorを試してみました。 Injectorの特徴 ドキュメントでも説明されてますが、Google Guiceライクなフレームワークになっています。 Google Guiceの説明はこの方の記事がわかりやすかったです。 Google Guice 使い方メモ InjectやModule、Providerな
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く