Problem
The FastAPI example currently uses the deprecated resilient_api and
ResilientConfig APIs.
These APIs have been replaced by smooth_api and SmoothConfig, but the
example has not yet been updated. Running the example therefore produces
deprecation warnings.
What needs to be done
Update examples/fastapi/main.py to use the current SmoothAPI APIs.
Specifically:
- Replace
resilient_api with smooth_api
- Replace
ResilientConfig with SmoothConfig
- Keep the existing example behavior unchanged
Acceptance Criteria
Files to look at
examples/fastapi/main.py
packages/smooth-api-py/smooth_api/__init__.py
Prerequisites
Basic Python and familiarity with imports.
Notes
Please avoid making unrelated changes to the example.
Problem
The FastAPI example currently uses the deprecated
resilient_apiandResilientConfigAPIs.These APIs have been replaced by
smooth_apiandSmoothConfig, but theexample has not yet been updated. Running the example therefore produces
deprecation warnings.
What needs to be done
Update
examples/fastapi/main.pyto use the current SmoothAPI APIs.Specifically:
resilient_apiwithsmooth_apiResilientConfigwithSmoothConfigAcceptance Criteria
examples/fastapi/main.pyuses the current API namesFiles to look at
examples/fastapi/main.pypackages/smooth-api-py/smooth_api/__init__.pyPrerequisites
Basic Python and familiarity with imports.
Notes
Please avoid making unrelated changes to the example.