yama package

Submodules

yama.core module

class yama.core.YAMA(yama_file)[source]

Bases: object

YAMA Core class.

YAMA call is used to handle YAMA docuemnts through a YAMA object. This object can be hadled Application Profiles programatically.

Parameters:
  • yama_file (str) – Accessible location of a YAMA file, this YAMA docuemnt
  • be parsed and the Application Profile object will be returend. (will) –
Returns:

Extandable Application Profile object is returned.

Return type:

YAMA (object)

render(template_file)[source]

A renderer for Application Profile Object, which will render any given template to specific output.

Note

At this stage of development, only Jinja2 templates are supported.

Parameters:template_file – Location of the template file.
Returns:A rendered output of the DSP using provided template.
version()[source]

Access the version number of DSP, if the version is declared in the YAMA docuemnt.

Note

This methode will be expanded to deal with automatic versioning.

Returns:Version of the Application Profile declared in the YAMA docuemnt.
yama.core.expand_namespace(namespaces, description_property)[source]

Function to expand namespaces

Parameters:
  • namespaces (dict) – namespaces dictionary
  • description_property (str) – Exapanded namespace for property.
Returns:

Returns an expanded property string with URI.

Return type:

uri+property(str)

yama.core.generate_description_set(description_set, descriptions_dictionary)[source]

Function to generate description set

Parameters:
  • descriptions_set (dict) – Dictionary of description set
  • descriptions_dictionary (dict) – Dictionary of descriptions.
Returns:

Updated description set dictionary.

Return type:

descriptionset(dict)

yama.core.generate_descriptions(descriptions_dictionary, statements_dictionary)[source]

Function to generate description

Parameters:
  • descriptions_dictionary (dict) – Dictionary of statements
  • statements_dictionary (dict) – Dictionary of statements.
Returns:

Updated descriptions dictionary.

Return type:

descriptions (dict)

yama.core.generate_statements(statements_dictionary, namespaces)[source]

Function to generate statements

Parameters:
  • namespaces (dict) – namespaces dictionary
  • statements_dictionary (dict) – Dictionary of statements.
Returns:

Updated statements dictionary.

Return type:

statemets(dict)

yama.helpers module

class yama.helpers.DefaultOrderedDict(default_factory=None, *a, **kw)[source]

Bases: collections.OrderedDict

copy() → a shallow copy of od[source]

Module contents