|
| 1 | +# Table of Contents |
| 2 | + |
| 3 | +* [ALDashboard.aldashboard](#ALDashboard.aldashboard) |
| 4 | + * [speedy\_get\_users](#ALDashboard.aldashboard.speedy_get_users) |
| 5 | + * [speedy\_get\_sessions](#ALDashboard.aldashboard.speedy_get_sessions) |
| 6 | + * [dashboard\_get\_session\_variables](#ALDashboard.aldashboard.dashboard_get_session_variables) |
| 7 | + * [ALPackageInstaller](#ALDashboard.aldashboard.ALPackageInstaller) |
| 8 | + * [get\_validated\_github\_username](#ALDashboard.aldashboard.ALPackageInstaller.get_validated_github_username) |
| 9 | + * [ErrorList](#ALDashboard.aldashboard.ErrorList) |
| 10 | + * [ErrorLikeObject](#ALDashboard.aldashboard.ErrorLikeObject) |
| 11 | + * [install\_fonts](#ALDashboard.aldashboard.install_fonts) |
| 12 | + * [list\_installed\_fonts](#ALDashboard.aldashboard.list_installed_fonts) |
| 13 | + * [nicer\_interview\_filename](#ALDashboard.aldashboard.nicer_interview_filename) |
| 14 | + * [list\_question\_files\_in\_package](#ALDashboard.aldashboard.list_question_files_in_package) |
| 15 | + * [list\_question\_files\_in\_docassemble\_packages](#ALDashboard.aldashboard.list_question_files_in_docassemble_packages) |
| 16 | + |
| 17 | +--- |
| 18 | +sidebar_label: aldashboard |
| 19 | +title: ALDashboard.aldashboard |
| 20 | +--- |
| 21 | + |
| 22 | +<a id="ALDashboard.aldashboard.speedy_get_users"></a> |
| 23 | + |
| 24 | +#### speedy\_get\_users() |
| 25 | + |
| 26 | +```python |
| 27 | +def speedy_get_users() -> List[Dict[int, str]] |
| 28 | +``` |
| 29 | + |
| 30 | +Return a list of all users in the database. Possibly faster than get_user_list(). |
| 31 | + |
| 32 | +<a id="ALDashboard.aldashboard.speedy_get_sessions"></a> |
| 33 | + |
| 34 | +#### speedy\_get\_sessions(user\_id: Optional[int] = None, filename: Optional[str] = None, filter\_step1: bool = True, metadata\_key\_name: str = "metadata") |
| 35 | + |
| 36 | +```python |
| 37 | +def speedy_get_sessions(user_id: Optional[int] = None, |
| 38 | + filename: Optional[str] = None, |
| 39 | + filter_step1: bool = True, |
| 40 | + metadata_key_name: str = "metadata") -> List[Tuple] |
| 41 | +``` |
| 42 | + |
| 43 | +Return a list of the most recent 500 sessions, optionally tied to a specific user ID. |
| 44 | + |
| 45 | +Each session is a tuple with named columns: |
| 46 | +filename, |
| 47 | +user_id, |
| 48 | +modtime, |
| 49 | +key |
| 50 | + |
| 51 | +<a id="ALDashboard.aldashboard.dashboard_get_session_variables"></a> |
| 52 | + |
| 53 | +#### dashboard\_get\_session\_variables(session\_id: str, filename: str) |
| 54 | + |
| 55 | +```python |
| 56 | +def dashboard_get_session_variables(session_id: str, filename: str) |
| 57 | +``` |
| 58 | + |
| 59 | +Return the variables and steps for a given session ID and YAML filename in serializable dictionary format. |
| 60 | + |
| 61 | +<a id="ALDashboard.aldashboard.ALPackageInstaller"></a> |
| 62 | + |
| 63 | +## ALPackageInstaller Objects |
| 64 | + |
| 65 | +```python |
| 66 | +class ALPackageInstaller(DAObject) |
| 67 | +``` |
| 68 | + |
| 69 | +Methods and state for installing AssemblyLine. |
| 70 | + |
| 71 | +<a id="ALDashboard.aldashboard.ALPackageInstaller.get_validated_github_username"></a> |
| 72 | + |
| 73 | +#### get\_validated\_github\_username(access\_token: str) |
| 74 | + |
| 75 | +```python |
| 76 | +def get_validated_github_username(access_token: str) |
| 77 | +``` |
| 78 | + |
| 79 | +Given a valid GitHub `access_token`, returns the username associated with it. |
| 80 | +Otherwise, adds one or more errors to the installer. |
| 81 | + |
| 82 | +<a id="ALDashboard.aldashboard.ErrorList"></a> |
| 83 | + |
| 84 | +## ErrorList Objects |
| 85 | + |
| 86 | +```python |
| 87 | +class ErrorList(DAList) |
| 88 | +``` |
| 89 | + |
| 90 | +Contains `ErrorLikeObject`s so they can be recognized by docassemble. |
| 91 | + |
| 92 | +<a id="ALDashboard.aldashboard.ErrorLikeObject"></a> |
| 93 | + |
| 94 | +## ErrorLikeObject Objects |
| 95 | + |
| 96 | +```python |
| 97 | +class ErrorLikeObject(DAObject) |
| 98 | +``` |
| 99 | + |
| 100 | +An object with a `template_name` that identifies the DALazyTemplate that will |
| 101 | +show its error. It can contain any other attributes so its template can access them |
| 102 | +as needed. DAObject doesn't seem to be enough to allow template definition. |
| 103 | + |
| 104 | +<a id="ALDashboard.aldashboard.install_fonts"></a> |
| 105 | + |
| 106 | +#### install\_fonts(the\_font\_files: DAFileList) |
| 107 | + |
| 108 | +```python |
| 109 | +def install_fonts(the_font_files: DAFileList) |
| 110 | +``` |
| 111 | + |
| 112 | +Install fonts to the server and restart both supervisor and unoconv. |
| 113 | + |
| 114 | +<a id="ALDashboard.aldashboard.list_installed_fonts"></a> |
| 115 | + |
| 116 | +#### list\_installed\_fonts() |
| 117 | + |
| 118 | +```python |
| 119 | +def list_installed_fonts() |
| 120 | +``` |
| 121 | + |
| 122 | +List the fonts installed on the server. |
| 123 | + |
| 124 | +<a id="ALDashboard.aldashboard.nicer_interview_filename"></a> |
| 125 | + |
| 126 | +#### nicer\_interview\_filename(filename: str) |
| 127 | + |
| 128 | +```python |
| 129 | +def nicer_interview_filename(filename: str) -> str |
| 130 | +``` |
| 131 | + |
| 132 | +Given a filename like docassemble.playground10ALWeaver:data/questions/assembly_line.yml, |
| 133 | +return a less cluttered name like: playground10ALWeaver:assembly_line |
| 134 | + |
| 135 | +<a id="ALDashboard.aldashboard.list_question_files_in_package"></a> |
| 136 | + |
| 137 | +#### list\_question\_files\_in\_package(package\_name: str) |
| 138 | + |
| 139 | +```python |
| 140 | +def list_question_files_in_package(package_name: str) -> Optional[List[str]] |
| 141 | +``` |
| 142 | + |
| 143 | +List all the files in the 'data/questions' directory of a package. |
| 144 | + |
| 145 | +**Arguments**: |
| 146 | + |
| 147 | +- `package_name` _str_ - The name of the package to list files from. |
| 148 | + |
| 149 | + |
| 150 | +**Returns**: |
| 151 | + |
| 152 | +- `List[str]` - A list of filenames in the 'data/questions' directory of the package. |
| 153 | + |
| 154 | +<a id="ALDashboard.aldashboard.list_question_files_in_docassemble_packages"></a> |
| 155 | + |
| 156 | +#### list\_question\_files\_in\_docassemble\_packages() |
| 157 | + |
| 158 | +```python |
| 159 | +def list_question_files_in_docassemble_packages() |
| 160 | +``` |
| 161 | + |
| 162 | +List all the files in the 'data/questions' directory of all docassemble packages. |
| 163 | + |
| 164 | +**Returns**: |
| 165 | + |
| 166 | + 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. |
| 167 | + |
0 commit comments