dsnparse
dsnparse copied to clipboard
Flesh out the parse_class?
Both morp and prom have similar Connection classes. Would it be worth fleshing out the base class with the base functionality here and then letting prom and morp extend it?
I do some variation of this in morp, prom, and caches:
d = {
"caches.interface.Redis": set(["redis"]),
}
kv = v.lower()
for interface_name, vals in d.items():
if kv in vals:
ret = interface_name
break
It would be great to make this natively supported