Project#

apsync.get_project(path: str) Optional[apsync.Project]#

Returns the project (or None) for a given path (file or folder) by recursively checking for the hidden project.json on the file system.

Parameters

path (str) – Path to the file or folder

Returns

The active project - or None

Example

>>> project = apsync.get_project("image.png")
>>> print (project.name)
apsync.get_projects(project: str) List[apsync.Project]#

Returns a list of all projects in the workspace that you have access to.

apsync.workspace_id#

The id of the workspace

Type

str

apsync.is_project(path: str, recursive: bool = False) bool#

Checks whether or not the given folder is a project. If recursive is True, the check is applied to all subfolders as well.

apsync.path#

The path of the project

Type

str

apsync.recursive#

Apply the check to all subfolders also

Type

bool

Returns

True if the path is a project

Example

>>> apsync.is_project("C:/Projects/MyProject")
>>> True
apsync.remove_project(project: apsync.Project) None#

Removes / Deletes a project on the workspace. Caution: This deletes the project for all users. Cannot be undone!

apsync.project#

The project that should be removed

Type

Project

class apsync.Project#

The Project identifies an anchorpoint project. It provides the name and path of the project plus an optional description. You can provide extra metadata as a dictionary of strings. Create a project through the create_project() function.

id#

The unique id of the project

Type

str

workspace_id#

The unique id of the workspace

Type

str

group_id#

The unique id of the user group

Type

str

path#

The path of the project root - or None.

Type

str

name#

The name of the project

Type

str

desc#

The description of the project

Type

str

Returns

The active project - or None

Example

>>> project = apsync.get_project("image.png")
>>> print (project.name)
get_metadata() Dict[str, str]#

Gets the additional metadata that is stored on the project in form of a dict[str,str]

Example

>>> project = apsync.get_project("C:/Projects/MyProject", "My Project")
>>> project.get_metadata()
>>> {'Aspect Ratio': '16:9', 'Client Name': 'Anchorpoint'}
update_metadata(arg0: Dict[str, str]) None#

Updates the additional metadata that is stored on the project in form of a dict[str,str]

Example

>>> project = apsync.get_project("C:/Projects/MyProject", "My Project")
>>> metadata = project.get_metadata()
>>> metadata["Client Name"] = "Anchorpoint"
>>> project.update_metadata(metadata)