Session#

class ansys.dynamicreporting.core.serverless.item.Session(*args, **kwargs)#

Bases: BaseModel

Execution context for a reporting run.

A Session captures environment information for a single ADR execution, such as host name, platform, and application version. It is referenced by Item instances to group related content.

Methods

Session.add_tag(tag[, value])

Add or update a single tag.

Session.as_dict([recursive])

Serialize the model into a plain dictionary.

Session.create(*args, **kwargs)

Session.delete()

Delete this object from the database.

Session.filter(*args, **kwargs)

Session.find(*args, **kwargs)

Session.get(*args, **kwargs)

Session.get_tags()

Return the raw tag string stored on this object.

Session.reinit()

Reset the in-memory ORM state for this object.

Session.rem_tag(tag)

Remove a tag by key, if it exists.

Session.remove_tag(tag)

Alias for rem_tag() for backwards compatibility.

Session.save(**kwargs)

Session.set_tags(tag_str)

Replace all tags with the given tag string.

Attributes

Session.application

Application name that produced the session.

Session.db

Database alias in which this object is stored.

Session.hostname

Hostname where the session was created.

Session.platform

Platform/architecture identifier (for example "win64").

Session.saved

Whether this object has been successfully saved to the database.

Session.tags

Tag string used to group and filter objects.

Session.version

Application version string.

Session.date

Session creation timestamp, defaulting to the current time.

Session.guid

Globally unique identifier for this object.

exception DoesNotExist(extra_detail: str = None)#

Bases: ObjectDoesNotExistError

exception IntegrityError(extra_detail: str = None)#

Bases: IntegrityError

exception MultipleObjectsReturned(extra_detail: str = None)#

Bases: MultipleObjectsReturnedError

exception NotSaved(extra_detail: str = None)#

Bases: ObjectNotSavedError

application: str = 'Serverless ADR Python API'#

Application name that produced the session.

date: datetime#

Session creation timestamp, defaulting to the current time.

hostname: str = 'runnervm6qbrg'#

Hostname where the session was created.

platform: str = 'linux'#

Platform/architecture identifier (for example "win64").

version: str = '1.0'#

Application version string.