Attention

This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.

Typing (harp.typing)

The Typing (harp.typing) package provides contains everything related to types and typing.

Contents

class GlobalSettings[source]

Bases: dict

Placeholder type for injecting global settings as a dictionary. Usually, you’d prefer to use the “local” settings of your application, but sometimes you need to access the global settings. For example, the dashboard uses it to display all the running instance settings in a system tab.

class Storage[source]

Bases: Protocol

__init__(*args, **kwargs)
async create_users_once_ready(users)[source]

Create users.

Parameters:

users (Iterable[str])

async get_blob(blob_id)[source]

Retrieve a blob, by id. Blobs are content adressable, although the hash is built on the source data and blob filters may be applied to the source data before storage, meaning that the hash may not be re-computable once storage is done.

async get_facet_meta(name)[source]

Retrieve a facet’s metadata, by name.

async get_transaction(id, /, *, username)[source]

Find a transaction, by id.

Parameters:
async get_transaction_list(*, username, with_messages=False, filters=None, page=1, cursor='', text_search='')[source]

Find transactions, using optional filters, for example to be displayed in the dashboard.

Parameters:
async get_usage()[source]

Get storage usage.

async set_user_flag(*, transaction_id, username, flag, value=True)[source]

Sets or unsets a user flag on a transaction.

Parameters:
  • transaction_id (str)

  • username (str)

  • flag (int)

async transactions_grouped_by_time_bucket(*, endpoint=None, time_bucket, start_datetime)[source]
Parameters:
  • time_bucket (str | None)

  • start_datetime (datetime | None)

Return type:

List[TransactionsGroupedByTimeBucket]

Submodules