auviewer.api module
Python API for working with AUViewer.
- auviewer.api.downsampleFile(filepath, destinationpath)[source]
Downsamples an original file, placing the processed file in the destination folder. Raises an exception in case of error. :param filepath: path to the original file :param destinationpath: path to the destination folder :return: None
- Parameters:
filepath (str)
destinationpath (str)
- Return type:
bool
- auviewer.api.getProject(id)[source]
Returns the project with matching ID. :return: the project instance belonging to the id, or None if not found
- Return type:
Project | None
- auviewer.api.getProjects()[source]
Returns loaded projects as a dict. :return: dict mapped from project ID to project instance of all loaded projects
- Return type:
Dict[int, Project]
- auviewer.api.getProjectsPayload(user_id)[source]
Returns a list of project information accessible to a given user. :return: list of objects containing project information
- Return type:
List[Dict]
- auviewer.api.listAvailableProjects()[source]
Returns list of available projects (ID, name, path) from the database. These projects are not necessarily loaded in memory (that is done using loadProjects() or loadProject(). :return:
- Return type:
List[List[str]]
- auviewer.api.listLoadedProjects()[source]
Returns list of projects loaded in memory (ID, name, path). :return: list of lists
- Return type:
List[List[str]]
- auviewer.api.listUsers()[source]
Returns list of users (ID, email, first name, last name) :return: list of lists
- Return type:
List[List[str]]
- auviewer.api.loadProject(id)[source]
Load a project into memory. Returns the project instance if successful. :return: the project instance, or None
- Return type:
Project | None
- auviewer.api.loadProjects()[source]
Load or reload projects into memory. If new projects are found on disk, they will be added to the database & loaded as well. Returns the same output as getProjects(). :return: dict mapped from project ID to project of all loaded projects
- Return type:
Dict[int, Project]
- auviewer.api.scaffoldProjectFolder(projDirPathObj)[source]
Generate the baseline project folder contents as needed