TeskaLabs/asab

Config: Introducing method to get multiple-line configuration option.

eliska-n opened this issue · 2 comments

Documentation of asab promises multiline configuration entry: https://asab.readthedocs.io/en/latest/asab/config.html#multiline-configuration-entry

This one is very often required, but (as far as I know) there is no tool/method for it. It is implemented is various ways on various places and I think the could be some method silimar to these: https://github.com/TeskaLabs/asab/blob/master/asab/config.py#L398
Something like getmultiline().

I used regex just recently to provide multiline parsing in a microservice.

rcurls = asab.Config.get("remote_control", "url")
rcurls = re.split(r"[\s\t\n]+", rcurls)
J-295 commented

\s should match \t and \n making that Regex be equivalent to just \s+

Solved by #468