Lithops

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

Lithops is a Python library for transparently running your Python applications in the Cloud, supporting serverless and containerized platforms like AWS Lambda, Google Cloud Functions, IBM Cloud Functions, Kubernetes, and more. Version 3.6.4 is the latest, with a release cadence of roughly monthly minor versions.

pip install lithops
error ModuleNotFoundError: No module named 'boto3'
cause Missing AWS dependencies; lithops requires boto3 for AWS backends.
fix
Install lithops with AWS extras: pip install lithops[aws]
error ibm_boto3 and ibm-cos-sdk are missing
cause IBM Cloud dependencies are not installed.
fix
Install lithops with IBM extras: pip install lithops[ibm]
error KeyError: 'monitoring_interval'
cause Configuration missing monitoring_interval key in older versions.
fix
Upgrade lithops to >=3.5.0 or add 'monitoring_interval' to your lithops config.
error AttributeError: 'Future' object has no attribute 'result'
cause Calling .result() on a Lithops future instead of .get_result() or using the future returned by call_async incorrectly.
fix
Use fexec.get_result() on the executor or call .result() on the future after .wait().
gotcha FunctionExecutor is not a context manager; you must call .get_result() or .wait() to ensure the execution completes. Failing to do so may result in uncollected futures.
fix Always call .get_result() or .wait() on the returned future.
breaking In lithops 3.4.0, AWS and IBM dependencies were moved to extras (lithops[aws], lithops[ibm]). Installing without extras will no longer include boto3 or ibm-cos-sdk.
fix Install with extras: pip install lithops[aws] or pip install lithops[ibm].
gotcha When using functools.partial with call_async or map, ensure the partial object is pickleable. Lithops serializes the function and arguments.
fix Use a wrapper function or ensure the partial is picklable. Version 3.6.4 improved support.
deprecated Passing access and secret keys directly in config for AWS is deprecated since lithops 3.3.0. Use IAM roles or environment variables.
fix Configure AWS credentials via AWS CLI or environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).
gotcha Default monitoring interval may cause 'KeyError: 'monitoring_interval'' if not set correctly (fixed in 3.5.0).
fix Upgrade to lithops>=3.5.0 or explicitly set monitoring_interval in config.
pip install lithops[aws]
pip install lithops[ibm]

Basic example: define a function, invoke it asynchronously via Lithops, and retrieve the result.

from lithops import FunctionExecutor
def hello(name):
    return f'Hello {name}!'
fexec = FunctionExecutor()
fexec.call_async(hello, 'World')
result = fexec.get_result()
print(result)