def write()

in src/azstoragetorch/io.py [0:0]


    def write(self, b: _client.SUPPORTED_WRITE_BYTES_LIKE_TYPE, /) -> int:
        """Writes a bytes-like object to the blob

        Data written may not be immediately uploaded. Instead, data may be uploaded
        via threads after :py:meth:`write` has returned or may be uploaded as part
        of subsequent calls to :py:class:`BlobIO` methods. This means if :py:meth:`write`
        has returned without an error, it does not mean the data was successfully uploaded to
        the blob. Calls to :py:meth:`flush` or :py:meth:`close` will upload all pending
        data, block until all data is uploaded, and propogate any errors.

        :param b: The bytes-like object to write to the blob.

        :returns: The number of bytes written

        :raises FatalBlobIOWriteError: if a fatal error occurs when writing to blob. If
            raised, no data written, nor uploaded, using this :py:class:`BlobIO` instance will be
            committed to the blob. It is recommended to create a new :py:class:`BlobIO`
            instance and retry all writes when attempting retries.
        """
        self._validate_supported_write_type(b)
        self._validate_writable()
        self._validate_not_closed()
        return self._write(b)