harp_apps.storage.models.transactions

Inheritance diagram of harp_apps.storage.models.transactions

class Transaction[source]

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

to_model(with_user_flags=False)[source]
elapsed: Mapped[float]
endpoint: Mapped[str]
finished_at: Mapped[datetime]
flags: Mapped[List[UserFlag]]
id: Mapped[int]
messages: Mapped[List[Message]]
started_at: Mapped[datetime]
property tags
tpdex: Mapped[int]
type: Mapped[str]
x_cached: Mapped[str]
x_method: Mapped[str]
x_no_cache: Mapped[bool]
x_status_class: Mapped[str]
class TransactionsRepository[source]

Bases: Repository[Transaction]

Type

alias of Transaction

__init__(session_factory, /, tags=None, tag_values=None)[source]
async create(values, /, *, session=None)[source]
Parameters:

values (dict | Transaction)

delete_old(old_after)[source]
Parameters:

old_after (timedelta)

select(*, with_messages=False, with_user_flags=False, with_tags=False)[source]
async set_tags(transaction, tags, /, *, session=None)[source]
Parameters: