url module¶
Fetch metadata from remote .conda or .tar.bz2 package.
Try to fetch less than the whole file if possible.
This module should only be used to make partial reads against a remote
package, typically just the info
portion. If a full .conda
format
package is needed, it is more efficient to download locally first and then use
the file-based API.
- conda_package_streaming.url.conda_reader_for_url(url, session: ~requests.sessions.Session = <requests.sessions.Session object>, fall_back_to_full_download: bool = False)¶
Return (name, file_like) suitable for package_streaming APIs
- Parameters:
url – URL to conda package
session – The session to use for web requests.
fall_back_to_full_download – If true, fall back to downloading the entire
package instead of streaming it in the case of a specific issue where the server incorrectly responds with 416 (Range Not Satisfiable). See LazyZipOverHTTP for more details.
- conda_package_streaming.url.extract_conda_info(url, destdir, checklist=frozenset({'info/index.json', 'info/recipe/meta.yaml'}), session=<requests.sessions.Session object>)¶
Extract info/index.json and info/recipe/meta.yaml from url to destdir; close url as soon as those files are found.
- conda_package_streaming.url.stream_conda_info(url, session=<requests.sessions.Session object>)¶
Yield (tar, member) for conda package at url
Just “info/” for .conda, all members for tar.