Skip to main content

urlparse3 is simple and powerful url parsing tool

Project description

urlparse3

Urlparse3 is simple and powerful url parsing tool. Example:

import urlparse3


url = 'http://admin:secret@domain.com/path?q=123#anchor'
parsed_url = urlparse3.parse_url(url)
print parsed_url.scheme  # http
print parsed_url.username  # admin
print parsed_url.password  # secret
print parsed_url.domain  # domain.com
print parsed_url.path    # path
# query is converted into dictionary
print parsed_url.query  # {'q': '123'}
print parsed_url.fragment # anchor

# now add new GET parameter
parsed_url['name'] = 'alex'
# and get url back to string representation
print parsed_url.geturl()  #
http://admin:secret@domain.com/path?q=123&name=alex#anchor

Changes:

  • Version 1.0.4. Fix parsing url path

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urlparse3-1.0.4.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file urlparse3-1.0.4.tar.gz.

File metadata

  • Download URL: urlparse3-1.0.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for urlparse3-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f9d1954039813116c559058e3cc5f7fc402bb7ec1a556089b0ea81038d64eaa6
MD5 d0a26269600fb57c6d9de30879203ad8
BLAKE2b-256 c5cecbe4dba0d39f5e0db75f30f617c2ba16f7415ffcd237b06196d1d07be888

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page