import_export
cleanup_file(file_path)
Removes temporary file after response finishes.
Source code in mlte/backend/api/endpoints/import_export.py
60 61 62 63 | |
export(*, current_user, models, custom_lists, users, catalogs, background_tasks)
Export store information as a zip file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
models
|
dict[str, list[str] | ExportWildcard] | ExportWildcard
|
Dict of models, with each containing list of versions to export |
required |
custom_lists
|
list[CustomListName] | ExportWildcard
|
List of custom lists to export |
required |
users
|
list[str] | ExportWildcard
|
List of users to export |
required |
catalogs
|
list[str] | ExportWildcard
|
List of catalogs to export |
required |
Source code in mlte/backend/api/endpoints/import_export.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
import_store(*, current_user, import_data, force=Form(False))
Import store information from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
import_data
|
Annotated[UploadFile, File()]
|
JSON file containing store information. |
required |
Source code in mlte/backend/api/endpoints/import_export.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |