I tried locally this sample code with boto3 wrapper provided by jeffy, but did not work.
from jeffy.sdk.sqs import Sqs
def handler(event, context):
Sqs().send_message(
queue_url=os.environ['QUEUE_URL'],
message='hello world'
)
Errors I got are the below.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/invoke.py", line 72, in <module>
module = import_module(args.handler_path.replace('/', '.'))
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "./sqs-publish.py", line 1, in <module>
from jeffy.sdk.sqs import Sqs
File "/usr/local/lib/python3.8/site-packages/jeffy/sdk/__init__.py", line 1, in <module>
from jeffy import framework
File "/usr/local/lib/python3.8/site-packages/jeffy/framework.py", line 1, in <module>
from jeffy.handlers import Handlers
File "/usr/local/lib/python3.8/site-packages/jeffy/handlers/__init__.py", line 7, in <module>
from jeffy.handlers.s3 import S3HandlerMixin
File "/usr/local/lib/python3.8/site-packages/jeffy/handlers/s3.py", line 6, in <module>
from jeffy.sdk.s3 import S3
File "/usr/local/lib/python3.8/site-packages/jeffy/sdk/s3.py", line 5, in <module>
from jeffy.sdk import SdkBase
ImportError: cannot import name 'SdkBase' from partially initialized module 'jeffy.sdk' (most likely due to a circular import) (/usr/local/lib/python3.8/site-packages/jeffy/sdk/__init__.py)