Skip to content

[fix] Update FastAPI example to use non-deprecated APIs #24

Description

@AryanSharma48

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

  • examples/fastapi/main.py uses the current API names
  • The FastAPI example runs successfully
  • No SmoothAPI deprecation warnings are produced
  • Existing endpoint behavior remains unchanged

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions