metadata

Metadata description classes

Classes

Application(name, description, license, …) Application description.
Command(name, command, description[, …]) Executable Command description.
MetadataJSONEncoder([skipkeys, …]) Custom JSON encoder for metadata classes.
ShortcutType Shortcut type
WOOrderedDict(**kwds) Write once ordered dict.


class eam.metadata.Application(name, description, license, copyright, version, commands, default=False)[source]

Application description.

SCHEMA_VERSION = 2

Schema version

commands = None

A write once ordered dictionary of commands. Note that the first command will be considered the default.

copyright = None

The copyright owner.

default = None

Default EAM application status

description = None

A short summary description.

classmethod from_dict(data)[source]

Create an Application instance from a dictionary.

Parameters:data (dict) – A dictionary to initialize the instance from.
license = None

The application license.

name = None

The name of the application.

to_dict()[source]

Export the Application description into a dictionary.

version = None

The application version

class eam.metadata.Command(name, command, description, arguments=None, icon=None, shortcut=None, gui=None)[source]

Executable Command description.

SCHEMA_VERSION = 2

Schema version

arguments = None

The list of command arguments, optional.

command = None

The command executable.

description = None

The command description, optional.

executable_path

Return the executable filepath of the command.

classmethod from_dict(data)[source]

Create a Command instance from a dictionary.

Parameters:data (dict) – A dictionary to initialize the instance from.
gui = None

Optional flag whether this entry point describes a GUI.

icon = None

Icon file to use for the shortcut, optional. Default is None (use the python executable icon).

name = None

The name of the command

shortcut = None

The type of shortcut to create, optional. Supported options {None, desktop}. Default is None (no shortcut). If an invalid option is provided then value is None.

to_dict()[source]

Export the Command description into a dictionary.

class eam.metadata.MetadataJSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]

Custom JSON encoder for metadata classes.

default(o)[source]

Override to support metadata classes.

class eam.metadata.ShortcutType[source]

Shortcut type

desktop = u'desktop'

Desktop shortcut.

none = None

No shortcut.

class eam.metadata.WOOrderedDict(**kwds)[source]

Write once ordered dict.

An OrderedDict that does not allow item overwrite.

Previous topic

commands

Next topic

logging

This Page