skillsnetwork.read#

async skillsnetwork.read(url, chunk_size=8192)[source]#

Reads file at URL into bytes

>>> import skillsnetwork
>>> content = await skillsnetwork.read("https://example.com/myfile") # Is bytes
>>> content_str = content.decode()                                   # Is str
Parameters
  • url (str) – The URL where the file is located.

  • chunk_size (int) – Number of bytes to read from url at a time.

Return type

bytes

Returns

bytes containing file located at URL

Raises