crypticorn 2.1.1__py3-none-any.whl → 2.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
crypticorn/common/auth.py CHANGED
@@ -23,20 +23,19 @@ apikey_header = APIKeyHeader(
23
23
 
24
24
  def Security( # noqa: N802
25
25
  dependency: Annotated[
26
- Optional[Callable[..., Any]], Doc("A dependable callable (like a function).")
27
- ] = None,
26
+ Callable[..., Any], Doc("A dependable callable (like a function).")
27
+ ],
28
28
  scopes: Annotated[
29
- Optional[list[Scope]],
29
+ list[Scope],
30
30
  Doc("API scopes required for the *path operation*."),
31
- ] = None,
31
+ ] = [],
32
32
  use_cache: Annotated[
33
33
  bool, Doc("Whether to cache the dependency during a single request.")
34
34
  ] = True,
35
35
  ) -> Any:
36
36
  """Security Dependency. Extends the fastapi.Security class to support enum scopes instead of strings."""
37
37
 
38
- # Convert Enum scopes to string
39
- scopes_str = [s.value for s in scopes] if scopes else None
38
+ scopes_str = [s.value if isinstance(s, Enum) else s for s in scopes] if scopes else None
40
39
 
41
40
  return params.Security(
42
41
  dependency=dependency, scopes=scopes_str, use_cache=use_cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Maximise Your Crypto Trading Profits with AI Predictions
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
@@ -55,7 +55,7 @@ crypticorn/auth/client/models/verify_wallet_request.py,sha256=b0DAocvhKzPXPjM62D
55
55
  crypticorn/auth/client/models/wallet_verified200_response.py,sha256=QILnTLsCKdI-WdV_fsLBy1UH4ZZU-U-wWJ9ot8v08tI,2465
56
56
  crypticorn/auth/client/models/whoami200_response.py,sha256=uehdq5epgeOphhrIR3tbrseflxcLAzGyKF-VW-o5cY8,2974
57
57
  crypticorn/common/__init__.py,sha256=lY87VMTkIEqto6kcEjC1YWsUvT03QuPmXwxCaeWE854,196
58
- crypticorn/common/auth.py,sha256=kO03VKuFRIoWXMDLPmgnVZ49EeTqOMzgJ2yEXt_SmQM,1223
58
+ crypticorn/common/auth.py,sha256=fpKxIECjywOOa9VCLDXXzFO7JaD64WfW68tBuLbkDX0,1188
59
59
  crypticorn/common/auth_client.py,sha256=7ptCkWZwuMSIFTx3gajOH4CScPFG-Pn5gLe1m_NY5AQ,7622
60
60
  crypticorn/common/errors.py,sha256=jGAS7TONKhdaRfft7w-0wrJ3BBTzqS6u03susiqAF0w,12723
61
61
  crypticorn/common/scopes.py,sha256=pRD9RauSRSxVGo8k5b2x66h3Wy2aaVEcluZvu6aMTE0,1418
@@ -225,7 +225,7 @@ crypticorn/trade/client/models/trading_action_type.py,sha256=jW0OsNz_ZNXlITxAfh9
225
225
  crypticorn/trade/client/models/update_notification.py,sha256=B9QUuVRNpk1e5G8o0WFgIg3inm-OX7KJAJcjVnRzYx8,3046
226
226
  crypticorn/trade/client/models/validation_error.py,sha256=uTkvsKrOAt-21UC0YPqCdRl_OMsuu7uhPtWuwRSYvv0,3228
227
227
  crypticorn/trade/client/models/validation_error_loc_inner.py,sha256=22ql-H829xTBgfxNQZsqd8fS3zQt9tLW1pj0iobo0jY,5131
228
- crypticorn-2.1.1.dist-info/METADATA,sha256=yQ-VVRigGhwWn9thJoC-qZtQMHth2JOF448X_kTAt2o,3120
229
- crypticorn-2.1.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
230
- crypticorn-2.1.1.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
231
- crypticorn-2.1.1.dist-info/RECORD,,
228
+ crypticorn-2.1.2.dist-info/METADATA,sha256=u4D3IWbrCj_sVH9-_9yeulEzF2kgaVu7E6FjD_1aMl0,3120
229
+ crypticorn-2.1.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
230
+ crypticorn-2.1.2.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
231
+ crypticorn-2.1.2.dist-info/RECORD,,