python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

[Feat] Async methods support

Open LioriE opened this issue 4 months ago • 1 comments

Related Issues

https://github.com/descope/etc/issues/5922

Related PRs

branch PR
python-sdk: feat/async-tests (Link) PR #666

Description

Introduces async_mode and refactors authentication and client methods to support both synchronous and asynchronous usage. All relevant methods now return either direct results or awaitables, using futu_apply and futu_awaitable utilities. Updates all authentication method classes and DescopeClient to propagate async support, improving flexibility for async applications.

Tests remained as is for this PR to showcase the old functionality still upholds

Must

  • [x] Tests
  • [ ] Documentation (if applicable)

LioriE avatar Oct 05 '25 08:10 LioriE

Coverage report

The coverage rate went from 97.81% to 97.25% :arrow_down:

96% of new lines are covered.

Diff Coverage details (click to unfold)

descope/descope_client.py

100% of new lines are covered (97.79% of the complete file).

descope/management/tenant.py

100% of new lines are covered (100% of the complete file).

descope/management/flow.py

100% of new lines are covered (100% of the complete file).

descope/management/user.py

100% of new lines are covered (96.01% of the complete file).

descope/authmethod/saml.py

100% of new lines are covered (100% of the complete file).

descope/auth.py

75.36% of new lines are covered (91.35% of the complete file). Missing lines: 139, 158, 159, 161, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 179

descope/management/fga.py

100% of new lines are covered (100% of the complete file).

descope/management/group.py

100% of new lines are covered (100% of the complete file).

descope/management/access_key.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/sso.py

100% of new lines are covered (100% of the complete file).

descope/management/sso_settings.py

100% of new lines are covered (100% of the complete file).

descope/management/authz.py

100% of new lines are covered (100% of the complete file).

descope/management/outbound_application.py

100% of new lines are covered (100% of the complete file).

descope/management/sso_application.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/webauthn.py

100% of new lines are covered (100% of the complete file).

descope/management/permission.py

100% of new lines are covered (100% of the complete file).

descope/management/audit.py

100% of new lines are covered (75.55% of the complete file).

descope/authmethod/password.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/oauth.py

100% of new lines are covered (100% of the complete file).

descope/future_utils.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/enchantedlink.py

100% of new lines are covered (97.77% of the complete file).

descope/management/role.py

100% of new lines are covered (96.96% of the complete file).

descope/management/project.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/totp.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/magiclink.py

100% of new lines are covered (96.07% of the complete file).

descope/management/jwt.py

100% of new lines are covered (100% of the complete file).

descope/authmethod/otp.py

100% of new lines are covered (96.33% of the complete file).

github-actions[bot] avatar Oct 05 '25 09:10 github-actions[bot]