nix-prefetch-url wrapper
See also documentation for nix-prefetch-url.
Info
All requests to the functions are automatically cached.
prefetch_url
async
Just a fancy wrapper around nix-prefetch-url to handle edge-cases like caching.
Parameters:
-
(unpackbool, default:False) –Whether to atomatically unpack the archive (raises an error if the provided URL is not an archive).
-
(namestr | None, default:None) –A custom name to give in the Nix store.
Raises:
-
URLPrefetchError–If
nix-prefetch-urlreturn non-zero exit code or wrote something to stderr.
prefetch_obj
async
prefetch_obj(obj: Prefetchable) -> URLPrefetchResult
Convenience function for objects that implement get_prefetch_url().
This function is practically useless because of superior NURL wrapper.
Response classes
URLPrefetchResult
URLPrefetchError
Bases: NetworkError