Skip to main content

ALDashboard.aldashboard

speedy_get_users

def speedy_get_users() -> List[Dict[int, str]]

Return a list of all users in the database. Possibly faster than get_user_list().

speedy_get_sessions

def speedy_get_sessions(user_id: Optional[int] = None,
filename: Optional[str] = None,
filter_step1: bool = True,
metadata_key_name: str = "metadata") -> List[Tuple]

Return a list of the most recent 500 sessions, optionally tied to a specific user ID.

Each session is a tuple with named columns: filename, user_id, modtime, key

dashboard_get_session_variables

def dashboard_get_session_variables(session_id: str, filename: str)

Return the variables and steps for a given session ID and YAML filename in serializable dictionary format.

ALPackageInstaller Objects

class ALPackageInstaller(DAObject)

Methods and state for installing AssemblyLine.

get_validated_github_username

def get_validated_github_username(access_token: str)

Given a valid GitHub access_token, returns the username associated with it. Otherwise, adds one or more errors to the installer.

ErrorList Objects

class ErrorList(DAList)

Contains ErrorLikeObjects so they can be recognized by docassemble.

ErrorLikeObject Objects

class ErrorLikeObject(DAObject)

An object with a template_name that identifies the DALazyTemplate that will show its error. It can contain any other attributes so its template can access them as needed. DAObject doesn't seem to be enough to allow template definition.

install_fonts

def install_fonts(the_font_files: DAFileList)

Install fonts to the server and restart both supervisor and unoconv.

list_installed_fonts

def list_installed_fonts()

List the fonts installed on the server.

nicer_interview_filename

def nicer_interview_filename(filename: str) -> str

Given a filename like docassemble.playground10ALWeaver:data/questions/assembly_line.yml, return a less cluttered name like: playground10ALWeaver:assembly_line

list_question_files_in_package

def list_question_files_in_package(package_name: str) -> Optional[List[str]]

List all the files in the 'data/questions' directory of a package.

Arguments

  • package_name str - The name of the package to list files from.

Returns

  • List[str] - A list of filenames in the 'data/questions' directory of the package.

list_question_files_in_docassemble_packages

def list_question_files_in_docassemble_packages()

List all the files in the 'data/questions' directory of all docassemble packages.

Returns

Dict[str, List[str]]: A dictionary where the keys are package names and the values are lists of filenames in the 'data/questions' directory of the package.

increment_index_value

def increment_index_value(by: int = 5000,
index_name: str = "uploads_indexno_seq")

Increment the file index value in the database by a specified amount.

Arguments

  • by int - The amount to increment the file index value by. Defaults to 5000.
  • index_name str - The name of the sequence to increment. Defaults to "uploads_indexno_seq".

get_current_index_value

def get_current_index_value() -> int

Get the current value of the file index sequence.

Returns

  • int - The current value of the file index sequence.

get_latest_s3_folder

def get_latest_s3_folder(prefix: str = "files/") -> Optional[int]

Return the highest integer “folder” that exists directly under prefix, or None if there are no numeric folders at all.

• Uses the S3 LIST paginator, so it works for any number of prefixes. • Ignores non‑numeric folder names (e.g. files/tmp/, files/images/, …). • Requires only read permission for ListObjectsV2.

Example return value: 45237