Core Model#

class interactions.ext.base.Base(*, name, version, link, description, long_description=None, packages=None, requirements=None, **kwargs)[source]#

A class representing the base structure of a 3rd party.

Variables:
  • version (Version) – The version of the library.

  • name (str) – The name of the library.

  • description (str) – The description of the library.

  • long_description (Optional[str]) – The long description of the library.

  • link (str) – The repository link or the library.

  • _packages (Optional[List[str]]) – The packages of the library.

  • _requirements (Optional[List[str]]) – The modules in the library required.

  • __objects (Dict[str, object]) – The objects running under the service.

add_service(obj, name)[source]#

Adds a service to the 3rd party for ease of accessibility in calling. The code theory behind this is to simplify the way you handle and manage the calling of other objects, as well as accessing their information.

Parameters:
  • obj (object) – The object to add as a service.

  • name (str) – The name of the object to map under.

Returns:

The mapped relation between the object and name.

Return type:

Dict[str, object]

remove_service(name)[source]#

Removes a service from the 3rd party in the event that it is no longer needed to be referred to for data.

Parameters:

name (str) – The name of the service to remove.

Returns:

If the service has been removed or not.

Return type:

bool

Raises:

UnknownService – An unknown service in the base.

property services: Dict[str, Any]#

Returns a view on all of the services currently stored under the 3rd party.

Returns:

A dictionary of objects sorted by their name.

Return type:

Dict[str, object]

interactions.ext.base.build(base)[source]#

Builds the base 3rd party the same way as setup from setuptools.