Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 1.8 KB

File metadata and controls

100 lines (70 loc) · 1.8 KB

Documentation

Usage

Methods

Kernel.__init__(environment, debug)

Constructor

from phoopy.kernel import Kernel

kernel = Kernel('dev', True)

Kernel.get_environment()

from phoopy.kernel import Kernel

kernel = Kernel('dev', True)
kernel.get_environment() # ~> dev

Kernel.boot()

from phoopy.kernel import Kernel

kernel = Kernel('dev', True)
kernel.boot()

Kernel.get_root_dir()

Returns the root directory

Kernel.get_app_dir()

Returns the app directory

Kernel.get_var_dir()

Returns the var directory

Kernel.get_parameter(key)

Returns the parameters as dict

Kernel.get_container()

Returns the Container object

Container.__init__()

from phoopy.kernel import Container

container = Container()

Container.__setitem__(key, item)

Add a container item

from phoopy.kernel import Container

container = Container()
container['hello_world'] = lambda container: 'Hello World'

Container.keys()

Returns all keys

Container.get(key)

Returns a container item or Raise an exception

Container.get_tagged_entries(tag_name)

Returns all container items that has a given tag

Bundle.__init__()

from phoopy.kernel import Bundle

bundle = Bundle()

Bundle.get_name()

Returns the Bundle Class name

Bundle.get_bundle_dir()

Returns the Bundle root directory

Bundle.service_path()

Should be implemented in order to return a service path if it is necessary

_Bundle.set_kernel(kernel)

Set Kernel

_Bundle.get_kernel(kernel)

Get Kernel

_Bundle.set_container(container)

Set Container

Bundle.get_container()

Get Container

Bundle.setup()

Should be implemented in order to setup some needed stuff it it is necessary