Module libbottles.component

Expand source code
class Component:
    '''
    Create a new object of type Component with all the methods for its management.

    Parameters
    ----------
    manifest : dict
        the component manifest
    local : bool
        if this is a local (installed) component (default is False)
    '''

    name = str
    category = str
    sub_category = str
    channel = str
    manifest_url = str
    installed = False

    def __init__(self, manifest: dict, local: bool = False):
        if not self.validate_manifest(manifest):
            raise ValueError("Given manifest doesn't seem a valid Component.")
            
        self.installed = local

    def validate_manifest(self, manifest: dict):
        return

Classes

class Component (manifest: dict, local: bool = False)

Create a new object of type Component with all the methods for its management.

Parameters

manifest : dict
the component manifest
local : bool
if this is a local (installed) component (default is False)
Expand source code
class Component:
    '''
    Create a new object of type Component with all the methods for its management.

    Parameters
    ----------
    manifest : dict
        the component manifest
    local : bool
        if this is a local (installed) component (default is False)
    '''

    name = str
    category = str
    sub_category = str
    channel = str
    manifest_url = str
    installed = False

    def __init__(self, manifest: dict, local: bool = False):
        if not self.validate_manifest(manifest):
            raise ValueError("Given manifest doesn't seem a valid Component.")
            
        self.installed = local

    def validate_manifest(self, manifest: dict):
        return

Class variables

var category

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

var channel

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

var installed
var manifest_url

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

var name

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

var sub_category

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Methods

def validate_manifest(self, manifest: dict)
Expand source code
def validate_manifest(self, manifest: dict):
    return