Skip to content

Supports multiple casting for variables using ContainerBuilder #5

@ticdenis

Description

@ticdenis

Currently we have 3 options to cast variables using the ContainerBuilder:

# pyproject.toml

[tool.aiodi.variables]
# Get static text.
debug = "Text"
# Get as str a variable.
debug2 = "%var(debug)%"
# Cast to int an environment variable.
debug3 = "%env(int:APP_DEBUG, '1')%"

But we can not do:

# pyproject.toml

[tool.aiodi.variables]
# ...
debug4 = "%env(bool:int:APP_DEBUG, '1')%"

We've detected that this is a common operation so would be great have it integrate it on ContainerBuilder.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions