io.BytesIO.writable

BytesIO.writable() → bool. Returns True if the IO object can be written.