Adding a Dataset Record Asynchronously
This sample runs the complete synchronous stamping and verification workflow without blocking an application’s asyncio event loop.
Implementation: samples/add_string_dataset_record_async.py
Why a worker thread is used
VBaseAPIClient provides a synchronous interface. Async applications can move the blocking network workflow to an executor:
loop = asyncio.get_running_loop()
result = await loop.run_in_executor(None, operation)The worker creates and closes its own API client. Client sessions are not shared across threads.
Run the sample
Complete the Quickstart, then run:
python samples/add_string_dataset_record_async.pyThe matching notebook uses top-level await but is generated from the same Python source. A successful run prints the collection CID, object CID, and verified timestamp.
Last updated

