mediapills / dependency-injection

Python Dependency Injection container
MIT License
2 stars 3 forks source link

Add string expressions implementation #10

Open mediapills opened 3 years ago

mediapills commented 3 years ago

You can use the string(key: str) helper to concatenate strings entries:

from mediapills.dependency_injection import Container

di = Container({
  "placeholder.one": "value one",
  "message": "placeholder.one => '{placeholder.one}'",
})

di.string("message")
mediapills commented 3 years ago

decorator string can be used and after decoration entries will be warped by special in vocable class.