3.1.1.1. xboinc.df_wu

3.1.1.1.1. Attributes

wu_db

wu_db_dev

user_db

3.1.1.1.2. Functions

_get_read_only_wu_db_connection(→ sqlite3.Connection)

Get a read-only database connection.

_get_read_only_user_db_connection(→ sqlite3.Connection)

Get a read-only user database connection.

query_all_work_units(→ pandas.DataFrame)

List all work units in the database as a Pandas DataFrame.

query_work_units_by_user(→ pandas.DataFrame)

List all work units for a specific user as a Pandas DataFrame.

query_work_units_by_status(→ pandas.DataFrame)

List all work units with a specific status as a Pandas DataFrame.

query_registered_work_units(→ pandas.DataFrame)

List all work units for the registered users with an optional status filter.

query_subscribed_users(→ list[tuple[str, str]])

Get a list of all users subscribed to the work unit database with their status.

check_user_subscription(→ str)

Check if a user is subscribed to the work unit database.

3.1.1.1.3. Module Contents

wu_db[source]
wu_db_dev[source]
user_db[source]
_get_read_only_wu_db_connection(dev_server: bool = False) sqlite3.Connection[source]

Get a read-only database connection.

_get_read_only_user_db_connection() sqlite3.Connection[source]

Get a read-only user database connection.

query_all_work_units(dev_server=False) pandas.DataFrame[source]

List all work units in the database as a Pandas DataFrame.

query_work_units_by_user(user: str, dev_server=False) pandas.DataFrame[source]

List all work units for a specific user as a Pandas DataFrame.

query_work_units_by_status(status: str, dev_server=False) pandas.DataFrame[source]

List all work units with a specific status as a Pandas DataFrame.

query_registered_work_units(status: str | None = None, dev_server: bool = False) pandas.DataFrame[source]

List all work units for the registered users with an optional status filter.

Parameters:
  • status (Optional[str]) – The status to filter work units (e.g., ‘running’, ‘completed’).

  • dev_server (bool) – Whether to query for the development server or production server.

Returns:

DataFrame containing the work units for the user.

Return type:

pd.DataFrame

query_subscribed_users() list[tuple[str, str]][source]

Get a list of all users subscribed to the work unit database with their status.

Returns:

List of tuples containing (username, status) for users subscribed to the work unit database.

Return type:

list[tuple[str, str]]

check_user_subscription(user: str) str[source]

Check if a user is subscribed to the work unit database.

Parameters:

user (str) – The username to check.

Returns:

The status of the user if subscribed, “not_subscribed” otherwise, “broken” if the user’s directory is invalid.

Return type:

str