Python relative imports in AWS Lambda fail with attempted relative import with no known parent package
In AWS Lambda if I attempt an explicit relative import like this
.
├── lambda_file.py
└── example.py
| [tool.pylint.main] | |
| fail-under = 8.0 | |
| ignore = ["input"] | |
| ignored-modules = ["pandas", "numpy"] | |
| limit-inference-results = 100 | |
| persistent = true | |
| suggestion-mode = true | |
| [tool.pylint.basic] | |
| argument-naming-style = "snake_case" |
| def parse_multi_form(form): | |
| data = {} | |
| for url_k in form: | |
| v = form[url_k] | |
| ks = [] | |
| while url_k: | |
| if '[' in url_k: | |
| k, r = url_k.split('[', 1) | |
| ks.append(k) | |
| if r[0] == ']': |
By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. The recursive definition of the fibonacci number in Python is:
def fiboncci(n):
if n == 0:
return 0
elif n == 1:
return 1
else