I got a sample from github
https://github.com/influxdata/influxdb-client-python/blob/854fc6c9d844ca4ea801529af5e34c4efaed9df2/examples/asynchronous_batching.py