posted the question on SO, trying to simplify my complex:

**json.loads('{'+','.join(re.sub(r'([a-z0-9_-]*)=([a-z0-9_-]*)','"\\1":"\\2"',dsn).split())+'}')

which is now:

**dict(s.split('=') for s in dsn.split())

ah, relief!