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.properties.name)
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
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")
>>> project.update_metadata({"Client Name": "Anchorpoint"})