Given a database connection string structure (such like one you can find here) what’s the best way to parse a real URI string and get their component like user, password, database name and host?
Thank you very much
Advertisement
Answer
There is a Python library for that:
- python 2: urlparse
- python 3: urllib.parse