Mityuha / fresh-bakery

Bake dependency injections asynchronously and stupidly simple
https://fresh-bakery.readthedocs.io/en/latest/
MIT License
21 stars 0 forks source link

DI for bakery itself #49

Closed Mityuha closed 1 month ago

Mityuha commented 2 months ago

Playing around bakery's injection into other bakery. Like

from bakery import Bakery, Cake

class Bakery1(Bakery):
    some_value_expected: str = Cake()

class Bakery2(Bakery):
    some_value: str = Cake("123")
    bakery1: Bakery1 = Cake(Cake(Bakery1, some_value_expected = some_value))
Mityuha commented 1 month ago

Implemented in #53 and #54 (docs)