Skip to main content

convenience functions for working with URLs

Project description

Latest release 20191004: Small updates for changes to other modules.

Function isURL(U)

Test if an object U is an URL instance.

Class NetrcHTTPPasswordMgr

MRO: urllib.request.HTTPPasswordMgrWithDefaultRealm, urllib.request.HTTPPasswordMgr
A subclass of HTTPPasswordMgrWithDefaultRealm that consults the .netrc file if no overriding credentials have been stored.

Function skip_errs(iterable)

Iterate over iterable and yield its values. If it raises URLError or HTTPError, report the error and skip the result.

Function strip_whitespace(s)

Strip whitespace characters from a string, per HTML 4.01 section 1.6 and appendix E.

Function URL(U, referer, **kw)

Factory function to return a _URL object from a URL string. Handing it a _URL object returns the object.

Release Log

Release 20191004: Small updates for changes to other modules.

Release 20160828: Use "install_requires" instead of "requires" in DISTINFO.

Release 20160827: Handle TimeoutError, reporting elapsed time. URL: present ._fetch as .GET. URL: add .resolve to resolve this URL against a base URL. URL: add .savepath and .unsavepath methods to generate nonconflicting save pathnames for URLs and the reverse. URL._fetch: record the post-redirection URL as final_url. New URLLimit class for specifying simple tests for URL acceptance. New walk(): method to walk website from starting URL, yielding URLs. URL.content_length property, returns int or None if header missing. New URL.normalised method to return URL with . and .. processed in the path. new URL.exists test function. Assorted bugfixes and improvements.

Release 20150116: Initial PyPI release.

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

cs.urlutils-20191004.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file cs.urlutils-20191004.tar.gz.

File metadata

  • Download URL: cs.urlutils-20191004.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

File hashes

Hashes for cs.urlutils-20191004.tar.gz
Algorithm Hash digest
SHA256 af8c3d306fa8dc7000184f15a4a1844402e2f23e966b1b59f62b5f9e8445dbac
MD5 a2dbaa416681ddb53f0c5f460279176b
BLAKE2b-256 540808e8381aabe437c2963bb5869f3e8f9a55e2743be5419b919061852e6f81

See more details on using hashes here.

Supported by

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