memoryview for viewing buffers.
Is there something analogous for io streams, or some library which implements this?
An example of what I'm thinking would be (doesn't work of course):
>>> import io
>>> sr = io.BytesIO(b'12345')
(this is just an example, the underlying stream doesn't have to be a buffer at all)
The reason I want views over plain bytes is that the contents underlying the stream may be very large.
You may consider mmap module. As far as I understand your needs it may provide required functionality.