Stonefish Runtime

raw JSON →
0.4.10 verified Mon Apr 27 auth: no python

Stonefish Runtime is a lightweight runtime library for deploying and executing serverless functions, especially in edge environments. It supports function orchestration, dependency injection, and cloud-edge synchronization. Current version 0.4.10, released on 2025-04-22. Pre-release phase with weekly updates.

pip install stonefish-runtime
error ModuleNotFoundError: No module named 'stonefish_runtime'
cause Wrong import name. The package uses hyphen in PyPI, but import uses underscore. The module is 'stonefish'.
fix
Replace 'import stonefish_runtime' with 'import stonefish' or 'from stonefish import Runtime'.
error TypeError: Runtime.__init__() got an unexpected keyword argument 'port'
cause In v0.4.0, Runtime.__init__ no longer accepts 'port' directly; pass it via 'config' dict.
fix
Change Runtime(handler, port=8080) to Runtime(handler, config={'port': 8080}) or use rt.run(config={'port':8080}).
gotcha The PyPI package is 'stonefish-runtime', but importable as 'stonefish'. Using 'import stonefish_runtime' will raise ModuleNotFoundError.
fix Use 'from stonefish import Runtime' or 'import stonefish'.
breaking Breaking change between v0.3.x and v0.4.x: The 'Runtime.run()' method now accepts a 'config' dict instead of keyword arguments for port, host, etc.
fix Replace rt.run(port=8080) with rt.run(config={'port': 8080}).
deprecated The synchronous 'deploy' function is deprecated in v0.4.0+. Use the async 'deploy_async' instead.
fix Replace 'stonefish.deploy(func)' with 'await stonefish.deploy_async(func)'.

Minimal async function and runtime initialization.

from stonefish import Runtime

async def handler(event, context):
    return {"message": "Hello from Stonefish!"}

if __name__ == "__main__":
    rt = Runtime(handler)
    rt.run()