Zoo Config Manager¶
- class Zoo(zooPath)¶
Bases:
object
Zoo class is the main entry point for operating on any part of zoo tools.
- Parameters:
zooPath (str) – The root location of zootools root folder ie. the one above the installation folder.
- Raise:
errors.FileNotFoundError
- coreVersion()¶
Returns core(this) package version string.
- Returns:
coreVersion ie. “1.0.0”
- Return type:
- buildVersion()¶
Returns the Zoo Tools build version string.
- Returns:
buildVersion ie. “1.0.0”
- Return type:
- buildPackagePath()¶
Returns the fullPath to the zoo_package.json which is the build package.
- Returns:
str
- property isAdmin¶
Returns whether the current user is in admin mode.
- Returns:
True if admin.
- Return type:
- property commands¶
Returns the executable cli commands dict cache.
- Returns:
Plugin manager instance
- Return type:
- property rootPath¶
Returns the root path of zootools.
The root path directory is the folder above the installation folder
- Returns:
The root folder of zootools.
- Return type:
- property configPath¶
Returns the config folder which sits below the root.
- Returns:
The config folder for zootools.
- Return type:
- property corePath¶
The core folder of zootools which is relative to the root under the installation folder.
The core folder houses internal logic of zootools package management.
- Returns:
The core folder
- Return type:
- property packagesPath¶
Returns the package repository path under the zootools/install folder.
This folder is the location for all installed packages. Each package Housed here is in the form of:
Packages - packageName - packageVersion(LooseVersion) -code
- Returns:
The package’s folder.
- Return type:
- property pythonPath¶
Returns the python folder path under the core installation.
- Returns:
The “python” folder path.
- Return type:
- property resolver¶
Returns the environment resolver instance which contains the package cache.
- Returns:
The Environment Resolver instance
- Return type:
resolver.Environment
- property commandLibrary¶
Returns the CLI command plugin manager instance.
Only one is created per Zoo session
- Return type:
pluginmanager.PluginManager
- property descriptorLibrary¶
Returns the descriptor types plugin manager instance.
Only one is created per Zoo session
- Return type:
descriptor.DescriptorRegistry
- preferenceRootsPath()¶
Returns the preferences roots config file path in the installRoot/config/env folder.
- Return type:
- preferenceRootsConfig()¶
Loads and returns the preference_roots file contents as a dict
- Return type:
- cacheFolderPath()¶
Returns the current Zoo tools cache folder.
The cache folder is used to store temporary data like pip installed libraries, logs, temp export files etc.
- Return type:
- sitePackagesPath()¶
Returns the site packages folder path where zootools installs pip packages when needed. This path is python version dependent.
- Return type:
- descriptorFromDict(descriptorDict)¶
Helper method which calls for
zoo.core.descriptors.descriptor.descriptorFromDict()
- Parameters:
descriptorDict (dict) – See
zoo.core.descriptors.descriptor.descriptorFromDict()
for more info- Returns:
The corresponding Descriptor instance
- Return type:
- descriptorForPackageName(name)¶
Returns the matching descriptor instance for the package name.
- Parameters:
name (str) – The zoo package name to find.
- Returns:
The descriptor or None
- Return type:
- descriptorsForPackageNames(*names)¶
Returns the matching descriptor instances for the package names.
- Parameters:
names (tuple[str]) – The zoo package names to find.
- Returns:
The descriptor or None
- Return type:
list[
zoo.core.descriptors.descriptor.Descriptor
or None]
- descriptorFromPath(location, descriptorDict)¶
Given absolute path and descriptor dict return the matching Descriptor instance.
- Parameters:
- Return type:
- runCommand(commandName, arguments)¶
Run’s the specified CLI command.
User runCommand(“commandName”, [”–help”]) to get the command help.
- shutdown()¶
Shutdown Method for zootools excluding Host application plugin related code.
- currentConfig()¶
Returns the
Zoo
instance currently initialized globally.If this func returns None call
zooFromPath()
.