skillsnetwork.download#
- async skillsnetwork.download(url, path=None, verbose=True, chunk_size=8192)[source]#
Downloads file located at URL to path.
>>> import skillsnetwork >>> path = "./my_file.txt" >>> await skillsnetwork.download("https://example.com/myfile", path) Saved as './my_file.txt' >>> with open(path, "r") as f: >>> content = f.read()
- Parameters
- Raises
FileNotFoundError – If path is invalid.
skillsnetwork.InvalidURLException – If URL is invalid.
- Return type