URL related utility functions and classes.
- Cameron Simpson <cs@cskk.id.au> 26dec2011
#
*Latest release 20231129*:
* Drop Python 2 support.
* No longer use cs.xml, which is going away.
* Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.
* URL.__init__: make parameters keyword only.
## Class `NetrcHTTPPasswordMgr(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.
## Class `URL(builtins.str, cs.deco.Promotable)`
Utility class to do simple stuff to URLs, subclasses `str`.
# Release Log
*Release 20231129*:
* Drop Python 2 support.
* No longer use cs.xml, which is going away.
* Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.
* URL.__init__: make parameters keyword only.
*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.
Raw data
{
"_id": null,
"home_page": "https://bitbucket.org/cameron_simpson/css/commits/all",
"name": "cs.urlutils",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python3",
"author": "Cameron Simpson",
"author_email": "Cameron Simpson <cs@cskk.id.au>",
"download_url": "https://files.pythonhosted.org/packages/11/99/12d87a09ddd967636c81d9bedbaac5c923cc399d8ab83c061c08d3fc8f42/cs.urlutils-20231129.tar.gz",
"platform": null,
"description": "URL related utility functions and classes.\n- Cameron Simpson <cs@cskk.id.au> 26dec2011\n#\n\n*Latest release 20231129*:\n* Drop Python 2 support.\n* No longer use cs.xml, which is going away.\n* Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.\n* URL.__init__: make parameters keyword only.\n\n## Class `NetrcHTTPPasswordMgr(urllib.request.HTTPPasswordMgrWithDefaultRealm, urllib.request.HTTPPasswordMgr)`\n\nA subclass of `HTTPPasswordMgrWithDefaultRealm` that consults\nthe `.netrc` file if no overriding credentials have been stored.\n\n## Function `skip_errs(iterable)`\n\nIterate over `iterable` and yield its values.\nIf it raises URLError or HTTPError, report the error and skip the result.\n\n## Function `strip_whitespace(s)`\n\nStrip whitespace characters from a string, per HTML 4.01 section 1.6 and appendix E.\n\n## Class `URL(builtins.str, cs.deco.Promotable)`\n\nUtility class to do simple stuff to URLs, subclasses `str`.\n\n# Release Log\n\n\n\n*Release 20231129*:\n* Drop Python 2 support.\n* No longer use cs.xml, which is going away.\n* Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.\n* URL.__init__: make parameters keyword only.\n\n*Release 20191004*:\nSmall updates for changes to other modules.\n\n*Release 20160828*:\nUse \"install_requires\" instead of \"requires\" in DISTINFO.\n\n*Release 20160827*:\n* Handle TimeoutError, reporting elapsed time.\n* URL: present ._fetch as .GET.\n* URL: add .resolve to resolve this URL against a base URL.\n* URL: add .savepath and .unsavepath methods to generate nonconflicting save pathnames for URLs and the reverse.\n* URL._fetch: record the post-redirection URL as final_url.\n* New URLLimit class for specifying simple tests for URL acceptance.\n* New walk(): method to walk website from starting URL, yielding URLs.\n* URL.content_length property, returns int or None if header missing.\n* New URL.normalised method to return URL with . and .. processed in the path.\n* new URL.exists test function.\n* Assorted bugfixes and improvements.\n\n*Release 20150116*:\nInitial PyPI release.\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 or later (GPLv3+)",
"summary": "convenience functions for working with URLs",
"version": "20231129",
"project_urls": {
"Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all",
"URL": "https://bitbucket.org/cameron_simpson/css/commits/all"
},
"split_keywords": [
"python3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1bef9d2095b4542ba3b8f8cd4b29d2ddcc694e2bf6ee5b442761cc91cc7abf8c",
"md5": "8345e6de2c33ec921e64e6b2bcf41e8e",
"sha256": "7ed0c547a7e4b42887a7e33d8dd134a9032897d26999594e5c3d9c6a6772354f"
},
"downloads": -1,
"filename": "cs.urlutils-20231129-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8345e6de2c33ec921e64e6b2bcf41e8e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9400,
"upload_time": "2023-11-29T09:05:03",
"upload_time_iso_8601": "2023-11-29T09:05:03.635469Z",
"url": "https://files.pythonhosted.org/packages/1b/ef/9d2095b4542ba3b8f8cd4b29d2ddcc694e2bf6ee5b442761cc91cc7abf8c/cs.urlutils-20231129-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "119912d87a09ddd967636c81d9bedbaac5c923cc399d8ab83c061c08d3fc8f42",
"md5": "d8d60af07643d3591ec4c2bc796463b0",
"sha256": "be83b55f9cedab0d9a052029c2b6e148b2c685ac21670fe0a6d9f4dc17ddc36f"
},
"downloads": -1,
"filename": "cs.urlutils-20231129.tar.gz",
"has_sig": false,
"md5_digest": "d8d60af07643d3591ec4c2bc796463b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11017,
"upload_time": "2023-11-29T09:05:06",
"upload_time_iso_8601": "2023-11-29T09:05:06.488219Z",
"url": "https://files.pythonhosted.org/packages/11/99/12d87a09ddd967636c81d9bedbaac5c923cc399d8ab83c061c08d3fc8f42/cs.urlutils-20231129.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-29 09:05:06",
"github": false,
"gitlab": false,
"bitbucket": true,
"codeberg": false,
"bitbucket_user": "cameron_simpson",
"bitbucket_project": "css",
"lcname": "cs.urlutils"
}