IAsyncEntityWriter#

class ansys.bdm.api.iasync_entity_writer.IAsyncEntityWriter#

Bases: Protocol

An object used to create a new entity from a stream of data.

Instances are created from IAsyncStorageScope.begin_store()

Overview#

stream

Return object that can be written to, which will be stored as the entity.

handle

Return the entity created by this object.

__aenter__

Start writing data that will comprise an entity.

__aexit__

Finish collecting data and store entity.

Import detail#

from ansys.bdm.api.iasync_entity_writer import IAsyncEntityWriter

Property detail#

property IAsyncEntityWriter.stream: anyio.abc.ByteSendStream#

Return object that can be written to, which will be stored as the entity.

This method will throw an exception if __enter__ has not been called.

This method will throw an exception if __exit__ has been called.

property IAsyncEntityWriter.handle: ansys.bdm.api.entity_handle.EntityHandle#

Return the entity created by this object.

This method will throw an exception if __exit__ has not been called.

Method detail#

async IAsyncEntityWriter.__aenter__() → IAsyncEntityWriter#

Start writing data that will comprise an entity.

async IAsyncEntityWriter.__aexit__(__exc_type: type[BaseException] | None, __exc_value: BaseException | None, __traceback: types.TracebackType | None) → None#

Finish collecting data and store entity.

This method will throw an exception if __enter__ has not been called.