code: def parse_pgurl(self, url):
          
          parsed = urlsplit(url)
  
          return {
              'user': parsed.username,
              'password': parsed.password,
              'database': parsed.path.lstrip('/'),
              'host': parsed.hostname,
              'port': parsed.port or 5432,
          }
docs: Given a Postgres url, return a dict with keys for user, password,
          host, port, and database.