Getting started
User guide
Reference
Read raw bytes from a local path or http(s) URL.
path_or_url (str)
timeout (float | None)
bytes
Read text from a local path or http(s) URL.
Local paths use text mode (same newline translation as Path.read_text). HTTP(S) URLs decode raw response bytes via to_str.
Path.read_text
to_str
encoding (str)
errors (str)
str