Streaming from a URL (like in the minimal example) doesn't seem to work on my machine (macOS 12.3.1 ARM). I get the following error message:
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
The link provides some info about the problem, but I can't judge if and how that applies here.