Skip to main content

murl is a tiny wrapper for the Python module urlparse.

Project description

Project details

Code:

http://github.com/berkerpeksag/murl

Issues:

https://github.com/berkerpeksag/murl/issues/

Documentation:

http://murl.rtfd.org/

Build status:
Travis CI

Installation

Install with pip:

$ pip install murl

Getting Started

from murl import Url


url = Url('https://bugzilla.mozilla.org/show_bug.cgi?id=698201#c0')
print url.scheme, url.host, url.querystring, url.fragment
# https bugzilla.mozilla.org id=698201 c0

url.scheme = 'http'
url.host = 'bugzilla.webkit.org'

print url
print url.url
print url.scheme
print url.host
print url.netloc
print url.host == url.netloc
# http://bugzilla.webkit.org/show_bug.cgi?id=698201#c0
# http://bugzilla.webkit.org/show_bug.cgi?id=698201#c0
# http
# bugzilla.webkit.org
# bugzilla.webkit.org
# True

url.path = 'list_bugs.cgi'
print url.path, url.url
# list_bugs.cgi http://bugzilla.webkit.org/list_bugs.cgi?id=698201#c0

url.fragment = 'c1'
print url.fragment
print url.url
# c1
# http://bugzilla.webkit.org/list_bugs.cgi?id=698201#c1

url.fragment = ''
print url.fragment
print url.url
# ''
# http://bugzilla.webkit.org/list_bugs.cgi?id=698201

License

All files that are part of this project are covered by the following license, except where explicitly noted.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

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

murl-0.5.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

murl-0.5.1-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file murl-0.5.1.tar.gz.

File metadata

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

File hashes

Hashes for murl-0.5.1.tar.gz
Algorithm Hash digest
SHA256 53c27d8dc55a81f1af15c03c44e111b30d86e22aac9fb6c82cb447c39783d1f7
MD5 6121e5403b2c0323220a22d0c4fd1906
BLAKE2b-256 fd040e6413a745d9c69bc6085bcda15b5ae06867d35f0c3c0b210fe2bb203a4d

See more details on using hashes here.

File details

Details for the file murl-0.5.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for murl-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cbc9e213a99a300bbddd678bd46c2defc3c79dab9091d0c7fc465a2c12d98754
MD5 29309cc0b697455c5cfa909bdae33d41
BLAKE2b-256 9bfd957f44bc1cec3fe4e3b5e43c9899210350ab4eacd9614ff0e4e9cfaebc87

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