@runner<EOL><INDENT>async def write(<EOL>self,<EOL>data: Union[PointType, Iterable[PointType]],<EOL>measurement: Optional[str] = None,<EOL>db: Optional[str] = None,<EOL>precision: Optional[str] = None,<EOL>rp: Optional[str] = None,<EOL>tag_columns: Optional[Iterable] = None,<EOL>**extra_tags,<EOL>) -> bool:<DEDENT>
if not self._session:<EOL><INDENT>await self.create_session()<EOL><DEDENT>if precision is not None:<EOL><INDENT>raise NotImplementedError("<STR_LIT>")<EOL><DEDENT>data = serialization.serialize(data, measurement, tag_columns, **extra_tags)<EOL>params = {'<STR_LIT>': db or self.db}<EOL>if rp:<EOL><INDENT>params['<STR_LIT>'] = rp<EOL><DEDENT>url = self.url.format(endpoint='<STR_LIT>')<EOL>async with self._session.post(url, params=params, data=data) as resp:<EOL><INDENT>if resp.status == <NUM_LIT>:<EOL><INDENT>return True<EOL><DEDENT>raise InfluxDBWriteError(resp)<EOL><DEDENT>
Writes data to InfluxDB.
        Input can be:

        1. A mapping (e.g. ``dict``) containing the keys:
           ``measurement``, ``time``, ``tags``, ``fields``
        2. A Pandas :class:`~pandas.DataFrame` with a :class:`~pandas.DatetimeIndex`
        3. A user defined class decorated w/
            :func:`~aioinflux.serialization.usertype.lineprotocol`
        4. A string (``str`` or ``bytes``) properly formatted in InfluxDB's line protocol
        5. An iterable of one of the above

        Input data in formats 1-3 are parsed to the line protocol before being
        written to InfluxDB.
        See the `InfluxDB docs <https://docs.influxdata.com/influxdb/latest/
        write_protocols/line_protocol_reference/>`_ for more details.

        :param data: Input data (see description above).
        :param measurement: Measurement name. Mandatory when when writing DataFrames only.
            When writing dictionary-like data, this field is treated as the default value
            for points that do not contain a `measurement` field.
        :param db: Database to be written to. Defaults to `self.db`.
        :param precision: Sets the precision for the supplied Unix time values.
            Ignored if input timestamp data is of non-integer type.
            Valid values: ``{'ns', 'u', 'µ', 'ms', 's', 'm', 'h'}``
        :param rp: Sets the target retention policy for the write.
            If unspecified, data is written to the default retention policy.
        :param tag_columns: Columns to be treated as tags
            (used when writing DataFrames only)
        :param extra_tags: Additional tags to be added to all points passed.
        :return: Returns ``True`` if insert is successful.
            Raises :py:class:`ValueError` otherwise.