openalea.core.service package#

Submodules#

openalea.core.service.control module#

openalea.core.service.control.clear_controls()[source]#
openalea.core.service.control.create_control(name, iname=None, value=None, constraints=None)[source]#

Create a new Control object. This object is local and standalone. To track it, use register service.

openalea.core.service.control.get_control(name)[source]#

Get a tracked control by name. If multiple control with same name exists, returns a list of controls.

openalea.core.service.control.group_controls(control_list)[source]#
openalea.core.service.control.new_control(name, iname=None, value=None, constraints=None)[source]#

Create a new tracked control.

openalea.core.service.control.register_control(control)[source]#

Ask application to track control.

openalea.core.service.control.unregister_control(control)[source]#

Ask application to stop tracking control.

openalea.core.service.data module#

openalea.core.service.data.DataClass(dtype=None)[source]#

Return class wich match dtype. For example, for ‘python’ dtype it return PythonModel class.

Matching can be extended with plugins. if dtype is None, returns all available DataClasses

openalea.core.service.data.DataFactory(path, mimetype=None, **kwargs)[source]#
openalea.core.service.data.DataType(path=None, name=None, mimetype=None)[source]#
openalea.core.service.data.MimeType(path=None, name=None)[source]#

Return mimetype for path. First, try to find extension in registery filled by models. If datatype is not found, use builtin module “mimetypes”. If it cannot guess, returns False.

Search in module allows to specify

openalea.core.service.interface module#

TODO: Documentation

openalea.core.service.interface.get_interface(interface, *args, **kwargs)[source]#

If interface is yet an instance of interface, returns it else, return an instance based on interface.

openalea.core.service.interface.guess_interface(obj)[source]#

Returns interfaces than can correspond to object

>>> guess(1)
['IInt']
openalea.core.service.interface.interface_class(interface=None)[source]#

Returns interface class corresponding to interface

openalea.core.service.interface.interface_label(interface)[source]#
openalea.core.service.interface.interface_name(interface=None)[source]#

Returns interface name corresponding to interface

openalea.core.service.interface.new_interface(interface=None, value=None, *args, **kwargs)[source]#

openalea.core.service.introspection module#

openalea.core.service.introspection.label(obj)[source]#
openalea.core.service.introspection.name(obj)[source]#

openalea.core.service.ipython module#

openalea.core.service.ipython.interpreter()[source]#
Returns:

a unique instance of advanced interpreter that respect interface IInterpreter

openalea.core.service.mimetype module#

openalea.core.service.mimetype.decode("openalealab/model", "model1") -> Model("model1")[source]#

returns an object Model of model1

openalea.core.service.mimetype.encode(Model("model1")) -> ("openalealab/model", "model1")[source]#

returns a tuple mimetype, mimedata

openalea.core.service.model module#

openalea.core.service.model.ModelClass(dtype=None, mimetype=None)[source]#

Return class wich match dtype. For example, for ‘python’ dtype it return PythonModel class.

Matching can be extended with plugins. if both dtype and mimetype is None, returns all available ModelClasses

openalea.core.service.model.ModelFactory(*args, **kwds)[source]#

openalea.core.service.plugin module#

openalea.core.service.plugin.debug_plugins(debug='all')[source]#
openalea.core.service.plugin.default_plugin_manager()[source]#
openalea.core.service.plugin.register_plugin(plugin, group=None)[source]#

openalea.core.service.project module#

openalea.core.service.project.active_project()[source]#
openalea.core.service.project.add_project_directory(projectdir)[source]#
openalea.core.service.project.default_project_manager()[source]#
openalea.core.service.project.project_item(project_name, category, name)[source]#
openalea.core.service.project.projects()[source]#
openalea.core.service.project.set_active_project(project)[source]#

openalea.core.service.run module#

openalea.core.service.run.get_model(name, *args, **kwds)[source]#
openalea.core.service.run.model(name, *args, **kwds)#
openalea.core.service.run.namespace(model, **kwargs)[source]#

openalea.core.service.serialization module#

openalea.core.service.serialization.deserialize(txt, fmt=None, **kwds)[source]#
openalea.core.service.serialization.get_loader(name='GenericLoader')[source]#
openalea.core.service.serialization.get_saver(name='GenericSaver')[source]#
openalea.core.service.serialization.load(path, fmt=None, **kwds)[source]#
openalea.core.service.serialization.picklable_object(obj)[source]#

Returns a picklable wrapper of obj. This service is used to pickle objects that are not natively pickable and that cannot be modified to be compatible with pickle.

entry_point: openalea.pickler

openalea.core.service.serialization.save(data, path, fmt=None, **kwds)[source]#
openalea.core.service.serialization.serialize(data, fmt=None, **kwds)[source]#

Module contents#