steamship.client package#

Submodules#

steamship.client.skill_to_provider module#

class steamship.client.skill_to_provider.SkillVendorConfig(*, plugin_handle: str, config: Dict[str, Any])[source]#

Bases: BaseModel

config: Dict[str, Any]#
plugin_handle: str#

steamship.client.skills module#

class steamship.client.skills.Skill(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

EMOTIONS = 'emotions'#
ENTITIES = 'entities'#
HIGHLIGHTS = 'highlights'#
KEYWORDS = 'keywords'#
SENTIMENTS = 'sentiments'#
SUMMARY = 'summary'#
TOPICS = 'topics'#

steamship.client.steamship module#

class steamship.client.steamship.Steamship(api_key: str = None, api_base: str = None, app_base: str = None, web_base: str = None, workspace: str = None, fail_if_workspace_exists: bool = False, profile: str = None, config_file: str = None, config: Configuration = None, trust_workspace_config: bool = False)[source]#

Bases: Client

Steamship Python Client.

get_workspace() Workspace[source]#
static temporary_workspace(**kwargs) Generator[Steamship, None, None][source]#

Create a client rooted in a temporary workspace that will be deleted after use.

static use(package_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PackageInstance[source]#

Creates/loads an instance of package package_handle.

The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is package_handle.

For example, one may write the following to always get back the same package instance, no matter how many times you run it, scoped into its own workspace:

`python instance = Steamship.use('package-handle', 'instance-handle') `

One may also write:

`python instance = Steamship.use('package-handle') # Instance will also be named `package-handle` `

If you wish to override the usage of a workspace named instance_handle, you can provide the workspace_handle parameter.

static use_plugin(plugin_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PluginInstance[source]#

Creates/loads an instance of plugin plugin_handle.

The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is plugin_handle.

For example, one may write the following to always get back the same plugin instance, no matter how many times you run it, scoped into its own workspace:

`python instance = Steamship.use_plugin('plugin-handle', 'instance-handle') `

One may also write:

`python instance = Steamship.use('plugin-handle') # Instance will also be named `plugin-handle` `

use_skill(skill: Skill, provider: Vendor | None = None, instance_handle: str | None = None, fetch_if_exists: bool | None = True) PluginInstance[source]#

steamship.client.vendors module#

class steamship.client.vendors.Vendor(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

OneAI = 'one-ai'#

Module contents#

class steamship.client.Steamship(api_key: str = None, api_base: str = None, app_base: str = None, web_base: str = None, workspace: str = None, fail_if_workspace_exists: bool = False, profile: str = None, config_file: str = None, config: Configuration = None, trust_workspace_config: bool = False)[source]#

Bases: Client

Steamship Python Client.

get_workspace() Workspace[source]#
static temporary_workspace(**kwargs) Generator[Steamship, None, None][source]#

Create a client rooted in a temporary workspace that will be deleted after use.

static use(package_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PackageInstance[source]#

Creates/loads an instance of package package_handle.

The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is package_handle.

For example, one may write the following to always get back the same package instance, no matter how many times you run it, scoped into its own workspace:

`python instance = Steamship.use('package-handle', 'instance-handle') `

One may also write:

`python instance = Steamship.use('package-handle') # Instance will also be named `package-handle` `

If you wish to override the usage of a workspace named instance_handle, you can provide the workspace_handle parameter.

static use_plugin(plugin_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PluginInstance[source]#

Creates/loads an instance of plugin plugin_handle.

The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is plugin_handle.

For example, one may write the following to always get back the same plugin instance, no matter how many times you run it, scoped into its own workspace:

`python instance = Steamship.use_plugin('plugin-handle', 'instance-handle') `

One may also write:

`python instance = Steamship.use('plugin-handle') # Instance will also be named `plugin-handle` `

use_skill(skill: Skill, provider: Vendor | None = None, instance_handle: str | None = None, fetch_if_exists: bool | None = True) PluginInstance[source]#