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@local-domain.com:8000/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.port    # 8000
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@local-domain.com:8000/path?q=123&name=alex#anchor

Changes:

  • Version 1.0.4. Fix parsing url path with slashes

  • Version 1.0.5. Fix parsing url query with slashes

  • Version 1.0.6. Fix urls with port. Add port property to ParsedUrl. Add test for check url with ports.

  • Version 1.0.7. Fix urls with dashes. Add test.

  • Version 1.0.8. Fix queries with dashes.

  • Version 1.0.9. Fix queries with “@” and “+” symbols.

  • Version 1.0.10. Fix url fragment regexp.

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.10.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

urlparse3-1.0.10.linux-x86_64.tar.gz (6.9 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for urlparse3-1.0.10.tar.gz
Algorithm Hash digest
SHA256 c5e667db24a1caac165c49133eda8487f1f585627373be3d698fb6425131e074
MD5 721eadcad660235748954decd1bbd066
BLAKE2b-256 74e4a45913144813d451cbd1c3cb951470835c64250166b611e3fb888f147aff

See more details on using hashes here.

File details

Details for the file urlparse3-1.0.10.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for urlparse3-1.0.10.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 d5663ece2677845f67bb5aa6b5a34d85349cca6a8b4587e2f21d7f205e199802
MD5 208fc4f9cc1352577b8864d0a74925f5
BLAKE2b-256 9321fe368fc20fc3393637c64724372cc980e70d1364526a9735cd9a024c19a1

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