steamship.cli.local_server package#

Submodules#

steamship.cli.local_server.handler module#

steamship.cli.local_server.handler.create_safe_handler(invocable: Type[Invocable] = None)[source]#

Mimics the create_safe_handler function in lambda_handler for parallelism.

steamship.cli.local_server.handler.make_handler(invocable_class: Type[Invocable], base_url: str | None = 'http://localhost', default_api_key: str | None = None, invocable_handle: str = None, invocable_version_handle: str = None, invocable_instance_handle: str = None, config: dict = None, workspace: str = None)[source]#

Creates and returns a SimpleHTTPRequestHandler class for an Invocable (package or plugin).

For use with steamship.cli.http.server.Server.

steamship.cli.local_server.server module#

class steamship.cli.local_server.server.SteamshipHTTPServer(invocable: Type[Invocable], base_url: str | None = None, port: int = 8080, invocable_handle: str = None, invocable_version_handle: str = None, invocable_instance_handle: str = None, config: dict = None, workspace: str = None)[source]#

Bases: object

A simple HTTP Server that wraps an invocable (package or plugin).

To use, call:

server = SteamshipHTTPServer(invocable) server.start()

To shut down, call:

server.stop()

base_url: str#
default_api_key: str | None = (None,)#
invocable: Type[Invocable]#
invocable_handle: str = (None,)#
invocable_instance_handle: str = (None,)#
invocable_version_handle: str = (None,)#
port: int#
server: TCPServer#
start()[source]#

Start the server.

stop()[source]#

Stop the server.

Note: This has to be called from a different thread or else it will deadlock.

class steamship.cli.local_server.server.ThreadedTCPServer(server_address, RequestHandlerClass, bind_and_activate=True)[source]#

Bases: ThreadingMixIn, TCPServer

Module contents#