ProjectManager#

class pybmd.project_manager.ProjectManager(project_manager)[source]

Bases: object

Methods

__init__(project_manager)

archive_project(project_name, file_path[, ...])

Archives project to provided filePath with the configuration as provided by the optional arguments

close_project(project)

close project

create_cloud_project(cloud_setting)

Creates and returns a cloud project.

create_folder(folder_name)

Creates a folder if folderName(string) is unique.

create_project(project_name)

Creates and returns a project if projectName(string) is unique, and None if it is not.

database_info(_DbType, _DbName[, _IpAddress])

database_info(DbType, DbName, IpAddress) generated for the database connection

delete_folder(folder_name)

Deletes the specified folder if it exists

delete_project(project_name)

Delete project in the current folder if not currently loaded

export_project(project_name, file_path[, ...])

Exports project to provided file path

get_current_database()

Returns a dictionary (with keys DbType, DbName and optional IpAddress) corresponding to the current database connection

get_current_project()

Returns the current project

get_database_list()

return database list

get_folder_list_in_current_folder()

Returns a list of folder names in current folder.

get_project_list_in_current_folder()

Returns a list of project names in current folder.

goto_parent_folder()

Opens parent folder of current folder in database if current folder has parent.

goto_root_folder()

Opens root folder in database.

import_cloud_project(file_path, cloud_setting)

import_project(file_path[, project_name])

Imports a project from the file path provided with given project name.

load_cloud_project(cloud_setting)

Loads and returns a cloud project with the following cloud settings if there is a match found, and None if there is no matching cloud project

load_project(project_name)

Loads and returns the@Project with name = project_name (string) if there is a match found, and None if there is no matching Project.

open_folder(folder_name)

Opens folder under given name.

restore_cloud_project(folder_path, cloud_setting)

restore_project(file_path[, project_name])

Restores a project from the file path provided with given project name.

save_and_close_current_project()

Saves the current project and closes it

save_project()

Saves the currently loaded project with its own name.

set_current_database(database_info)

Switches current database connection to the database specified by the keys below, and closes any open project.

close_project(project: Project) bool[source]

close project

Parameters:

project (Project) – project to close

Returns:

true if project was closed, false otherwise

Return type:

bool

create_folder(folder_name: str) bool[source]

Creates a folder if folderName(string) is unique.

Parameters:

folder_name (str) – folder name to create

Returns:

True if folder was created, False otherwise

Return type:

bool

create_project(project_name: str) Project[source]

Creates and returns a project if projectName(string) is unique, and None if it is not.

Parameters:

project_name (str) – Project name to create

Returns:

created project object

Return type:

Project

delete_folder(folder_name: str) bool[source]

Deletes the specified folder if it exists

Parameters:

folder_name (str) – Folder name to delete

Returns:

True if folder was deleted, False otherwise

Return type:

bool

delete_project(project_name: str) bool[source]

Delete project in the current folder if not currently loaded

Parameters:

project_name (str)

Return type:

bool

export_project(project_name: str, file_path: <module 'posixpath' (frozen)>, with_stills_and_luts=True) bool[source]

Exports project to provided file path

Parameters:
  • project_name (str) – project to export

  • file_path (path) – file path to export to

  • with_stills_and_luts (bool, optional) – export project with still and luts. Defaults to True.

Returns:

True if project was exported, False otherwise

Return type:

bool

get_current_database() dict[source]

Returns a dictionary (with keys DbType, DbName and optional IpAddress) corresponding to the current database connection

Returns:

database infomation with keys DbType, DbName and optional IpAddress

Return type:

dict

get_current_project() Project[source]

Returns the current project

Return type:

Project

get_database_list() List[Dict][source]

return database list

Return type:

List[Dict]

get_folder_list_in_current_folder() List[str][source]

Returns a list of folder names in current folder.

Return type:

List[str]

get_project_list_in_current_folder() List[str][source]

Returns a list of project names in current folder.

Return type:

List[str]

goto_parent_folder() bool[source]

Opens parent folder of current folder in database if current folder has parent.

Return type:

bool

goto_root_folder() bool[source]

Opens root folder in database.

Return type:

bool

import_project(file_path: <module 'posixpath' (frozen)>, project_name: str = None) bool[source]

Imports a project from the file path provided with given project name. Returns True if successful.

Parameters:
  • file_path (<module 'posixpath' (frozen)>)

  • project_name (str)

Return type:

bool

load_project(project_name) pybmd.project.Project[source]

Loads and returns the@Project with name = project_name (string) if there is a match found, and None if there is no matching Project.

Return type:

pybmd.project.Project

open_folder(folder_name: str) bool[source]

Opens folder under given name.

Parameters:

folder_name (str)

Return type:

bool

restore_project(file_path: <module 'posixpath' (frozen)>, project_name: str = None) bool[source]

Restores a project from the file path provided with given project name. Returns True if successful.

Parameters:
  • file_path (<module 'posixpath' (frozen)>)

  • project_name (str)

Return type:

bool

save_project() bool[source]

Saves the currently loaded project with its own name. Returns True if successful.

Return type:

bool

set_current_database(database_info: dict) bool[source]

Switches current database connection to the database specified by the keys below, and closes any open project.

Parameters:

database_info (dict) – DbType: ‘Disk’ or ‘PostgreSQL’ (string) DbName: database name (string) IpAddress: IP address of the PostgreSQL server (string, optional key - defaults to ‘127.0.0.1’)

Returns:

True if database was set, False otherwise

Return type:

bool

archive_project(project_name, file_path, is_archive_src_media: bool = True, is_archive_render_cache: bool = True, is_archive_proxy_media: bool = False) bool[source]

Archives project to provided filePath with the configuration as provided by the optional arguments

Parameters:
  • is_archive_src_media (bool)

  • is_archive_render_cache (bool)

  • is_archive_proxy_media (bool)

Return type:

bool

create_cloud_project(cloud_setting: CloudProjectsSetting) Project[source]

Creates and returns a cloud project.

Parameters:

cloud_setting (CloudProjectsSetting) – settings for the cloud project

Returns:

returns a cloud project

Return type:

Project

import_cloud_project(file_path: str, cloud_setting: CloudProjectsSetting) bool[source]
Parameters:
  • file_path (str) – filePath of file to import

  • cloud_setting (CloudProjectsSetting) – setting for the cloud project

Returns:

Returns True if import cloud project is successful; False otherwise

Return type:

bool

restore_cloud_project(folder_path: str, cloud_setting: CloudProjectsSetting) bool[source]
Parameters:
  • folder_path (str) – path of folder to restore

  • cloud_setting (CloudProjectsSetting) – setting for the cloud project

Returns:

Returns True if restore cloud project is successful; False otherwise

Return type:

bool

load_cloud_project(cloud_setting: CloudProjectsSetting) Project[source]

Loads and returns a cloud project with the following cloud settings if there is a match found, and None if there is no matching cloud project

Parameters:

cloud_setting (CloudProjectsSetting) – cloud project settings

Returns:

returns a cloud project

Return type:

Project

database_info(_DbType, _DbName, _IpAddress='127.0.0.1') dict[source]

database_info(DbType, DbName, IpAddress) generated for the database connection

Return type:

dict

save_and_close_current_project() bool[source]

Saves the current project and closes it

Return type:

bool