crypticorn 2.8.0rc1__tar.gz → 2.8.0rc3__tar.gz

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.
Files changed (259) hide show
  1. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/CHANGELOG.md +27 -0
  2. {crypticorn-2.8.0rc1/crypticorn.egg-info → crypticorn-2.8.0rc3}/PKG-INFO +2 -1
  3. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/__init__.py +4 -0
  4. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/create_api_key_request.py +3 -1
  5. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -1
  6. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/__init__.py +1 -0
  7. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/ansi_colors.py +0 -3
  8. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/auth.py +3 -1
  9. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/exceptions.py +13 -6
  10. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/logging.py +27 -14
  11. crypticorn-2.8.0rc3/crypticorn/common/middleware.py +28 -0
  12. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/mixins.py +3 -2
  13. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/router/admin_router.py +15 -11
  14. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/router/status_router.py +2 -2
  15. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/__init__.py +3 -0
  16. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/api/__init__.py +1 -0
  17. crypticorn-2.8.0rc3/crypticorn/hive/client/api/admin_api.py +1453 -0
  18. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/api/models_api.py +7 -7
  19. crypticorn-2.8.0rc3/crypticorn/hive/client/api/status_api.py +508 -0
  20. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/__init__.py +2 -0
  21. crypticorn-2.8.0rc3/crypticorn/hive/client/models/log_level.py +38 -0
  22. crypticorn-2.8.0rc3/crypticorn/hive/client/models/response_getuptime.py +159 -0
  23. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/main.py +2 -1
  24. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/__init__.py +3 -0
  25. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api/__init__.py +1 -0
  26. crypticorn-2.8.0rc3/crypticorn/pay/client/api/admin_api.py +1453 -0
  27. crypticorn-2.8.0rc3/crypticorn/pay/client/api/status_api.py +508 -0
  28. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/__init__.py +2 -0
  29. crypticorn-2.8.0rc3/crypticorn/pay/client/models/log_level.py +38 -0
  30. crypticorn-2.8.0rc3/crypticorn/pay/client/models/response_getuptime.py +159 -0
  31. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/scope.py +2 -0
  32. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/main.py +2 -0
  33. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3/crypticorn.egg-info}/PKG-INFO +2 -1
  34. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn.egg-info/SOURCES.txt +7 -0
  35. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn.egg-info/requires.txt +1 -0
  36. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/pyproject.toml +1 -1
  37. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/requirements/main.txt +1 -0
  38. crypticorn-2.8.0rc1/crypticorn/hive/client/api/status_api.py +0 -735
  39. crypticorn-2.8.0rc1/crypticorn/pay/client/api/status_api.py +0 -735
  40. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/MANIFEST.in +0 -0
  41. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/README.md +0 -0
  42. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/__init__.py +0 -0
  43. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/__init__.py +0 -0
  44. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/__init__.py +0 -0
  45. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/admin_api.py +0 -0
  46. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/auth_api.py +0 -0
  47. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/service_api.py +0 -0
  48. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/user_api.py +0 -0
  49. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api/wallet_api.py +0 -0
  50. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api_client.py +0 -0
  51. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/api_response.py +0 -0
  52. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/configuration.py +0 -0
  53. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/exceptions.py +0 -0
  54. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/__init__.py +0 -0
  55. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
  56. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
  57. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
  58. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
  59. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
  60. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
  61. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/create_user_request.py +0 -0
  62. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
  63. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
  64. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
  65. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
  66. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
  67. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
  68. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
  69. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/logout_default_response.py +0 -0
  70. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
  71. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
  72. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
  73. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
  74. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
  75. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
  76. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
  77. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
  78. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/token_info200_response.py +0 -0
  79. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
  80. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/update_user_request.py +0 -0
  81. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/user_by_username200_response.py +0 -0
  82. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
  83. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
  84. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify200_response.py +0 -0
  85. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
  86. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
  87. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
  88. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify_email_request.py +0 -0
  89. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
  90. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
  91. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/models/whoami200_response.py +0 -0
  92. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/py.typed +0 -0
  93. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/client/rest.py +0 -0
  94. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/auth/main.py +0 -0
  95. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/__init__.py +0 -0
  96. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/__main__.py +0 -0
  97. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/init.py +0 -0
  98. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/templates/Dockerfile +0 -0
  99. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/templates/__init__.py +0 -0
  100. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/templates/auth.py +0 -0
  101. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/templates/dependabot.yml +0 -0
  102. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/cli/templates/ruff.yml +0 -0
  103. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/client.py +0 -0
  104. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/decorators.py +0 -0
  105. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/enums.py +0 -0
  106. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/errors.py +0 -0
  107. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/pagination.py +0 -0
  108. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/scopes.py +0 -0
  109. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/urls.py +0 -0
  110. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/common/utils.py +0 -0
  111. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/__init__.py +0 -0
  112. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/api/data_api.py +0 -0
  113. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/api_client.py +0 -0
  114. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/api_response.py +0 -0
  115. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/configuration.py +0 -0
  116. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/exceptions.py +0 -0
  117. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/coins.py +0 -0
  118. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/data_download_response.py +0 -0
  119. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/data_info.py +0 -0
  120. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
  121. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/data_version.py +0 -0
  122. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/data_version_info.py +0 -0
  123. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/download_links.py +0 -0
  124. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/evaluation.py +0 -0
  125. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/evaluation_response.py +0 -0
  126. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/exception_detail.py +0 -0
  127. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/feature_size.py +0 -0
  128. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/model.py +0 -0
  129. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/model_create.py +0 -0
  130. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/model_status.py +0 -0
  131. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/model_update.py +0 -0
  132. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/target.py +0 -0
  133. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/target_info.py +0 -0
  134. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/models/target_type.py +0 -0
  135. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/py.typed +0 -0
  136. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/client/rest.py +0 -0
  137. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/hive/utils.py +0 -0
  138. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/__init__.py +0 -0
  139. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/__init__.py +0 -0
  140. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/__init__.py +0 -0
  141. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/change_in_timeframe_api.py +0 -0
  142. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
  143. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
  144. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/status_api.py +0 -0
  145. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/symbols_api.py +0 -0
  146. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api/udf_api.py +0 -0
  147. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api_client.py +0 -0
  148. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/api_response.py +0 -0
  149. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/configuration.py +0 -0
  150. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/exceptions.py +0 -0
  151. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/__init__.py +0 -0
  152. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/change_in_timeframe.py +0 -0
  153. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/exception_detail.py +0 -0
  154. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/funding_rate.py +0 -0
  155. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/ohlcv_history.py +0 -0
  156. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/resolution.py +0 -0
  157. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/search_symbol.py +0 -0
  158. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/sort_direction.py +0 -0
  159. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/symbol_group.py +0 -0
  160. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/symbol_info.py +0 -0
  161. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/symbol_type.py +0 -0
  162. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/timeframe.py +0 -0
  163. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/models/udf_config.py +0 -0
  164. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/py.typed +0 -0
  165. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/client/rest.py +0 -0
  166. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/klines/main.py +0 -0
  167. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/__init__.py +0 -0
  168. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/__init__.py +0 -0
  169. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/__init__.py +0 -0
  170. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
  171. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/indicators_api.py +0 -0
  172. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/logs_api.py +0 -0
  173. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
  174. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/markets_api.py +0 -0
  175. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/status_api.py +0 -0
  176. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api/tokens_api.py +0 -0
  177. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api_client.py +0 -0
  178. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/api_response.py +0 -0
  179. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/configuration.py +0 -0
  180. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/exceptions.py +0 -0
  181. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/models/__init__.py +0 -0
  182. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/models/exception_detail.py +0 -0
  183. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/models/severity.py +0 -0
  184. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/models/time_interval.py +0 -0
  185. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/models/trading_status.py +0 -0
  186. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/py.typed +0 -0
  187. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/client/rest.py +0 -0
  188. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/metrics/main.py +0 -0
  189. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/__init__.py +0 -0
  190. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api/now_payments_api.py +0 -0
  191. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api/payments_api.py +0 -0
  192. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api/products_api.py +0 -0
  193. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api_client.py +0 -0
  194. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/api_response.py +0 -0
  195. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/configuration.py +0 -0
  196. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/exceptions.py +0 -0
  197. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/exception_detail.py +0 -0
  198. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
  199. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
  200. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/payment.py +0 -0
  201. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/payment_status.py +0 -0
  202. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/product_create.py +0 -0
  203. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/product_read.py +0 -0
  204. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/product_sub_read.py +0 -0
  205. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/product_update.py +0 -0
  206. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/models/provider.py +0 -0
  207. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/py.typed +0 -0
  208. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/pay/client/rest.py +0 -0
  209. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/__init__.py +0 -0
  210. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/__init__.py +0 -0
  211. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/__init__.py +0 -0
  212. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/api_keys_api.py +0 -0
  213. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/bots_api.py +0 -0
  214. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/exchanges_api.py +0 -0
  215. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
  216. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/notifications_api.py +0 -0
  217. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/orders_api.py +0 -0
  218. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/status_api.py +0 -0
  219. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/strategies_api.py +0 -0
  220. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
  221. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api_client.py +0 -0
  222. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/api_response.py +0 -0
  223. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/configuration.py +0 -0
  224. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/exceptions.py +0 -0
  225. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/__init__.py +0 -0
  226. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/action_model.py +0 -0
  227. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/bot_model.py +0 -0
  228. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/bot_status.py +0 -0
  229. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/exception_detail.py +0 -0
  230. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/exchange_key_model.py +0 -0
  231. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/execution_ids.py +0 -0
  232. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/futures_balance.py +0 -0
  233. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
  234. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/margin_mode.py +0 -0
  235. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/notification_model.py +0 -0
  236. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/order_model.py +0 -0
  237. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/order_status.py +0 -0
  238. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/post_futures_action.py +0 -0
  239. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/spot_trading_action.py +0 -0
  240. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
  241. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
  242. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
  243. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/tpsl.py +0 -0
  244. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/models/trading_action_type.py +0 -0
  245. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/py.typed +0 -0
  246. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/client/rest.py +0 -0
  247. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn/trade/main.py +0 -0
  248. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn.egg-info/dependency_links.txt +0 -0
  249. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn.egg-info/entry_points.txt +0 -0
  250. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/crypticorn.egg-info/top_level.txt +0 -0
  251. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/requirements/dev.txt +0 -0
  252. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/requirements/extra.txt +0 -0
  253. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/requirements/test.txt +0 -0
  254. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/setup.cfg +0 -0
  255. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/tests/test_auth_client.py +0 -0
  256. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/tests/test_config.py +0 -0
  257. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/tests/test_enums.py +0 -0
  258. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/tests/test_errors.py +0 -0
  259. {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc3}/tests/test_pagination.py +0 -0
@@ -1,6 +1,33 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v2.8.0-rc.3 (2025-05-05)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Deprecate ExcludeEnumMixin
9
+ ([`ae57fb2`](https://github.com/crypticorn-ai/api-client/commit/ae57fb22ff410432ce28a9c0af3a02fa9f51104f))
10
+
11
+
12
+ ## v2.8.0-rc.2 (2025-05-05)
13
+
14
+ ### Bug Fixes
15
+
16
+ - Add psutil as dependency
17
+ ([`23cf77e`](https://github.com/crypticorn-ai/api-client/commit/23cf77ea002a2d6f8e31cd858a2dcc1890b8d8c1))
18
+
19
+ - Centralize cors middleware
20
+ ([`e5aa2d6`](https://github.com/crypticorn-ai/api-client/commit/e5aa2d60254076848530a6d5b9a349058ee45ac7))
21
+
22
+ - Run logging configuration in init of the library
23
+ ([`8b725e1`](https://github.com/crypticorn-ai/api-client/commit/8b725e18154d184c8593b8de086b0a789b6e180c))
24
+
25
+ ### Features
26
+
27
+ - Provide lifespan event for fastapi apps to configure logging on startup
28
+ ([`9a2e1c4`](https://github.com/crypticorn-ai/api-client/commit/9a2e1c45d87ad1581c0e1646689eba6ca0876564))
29
+
30
+
4
31
  ## v2.8.0-rc.1 (2025-05-04)
5
32
 
6
33
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.8.0rc1
3
+ Version: 2.8.0rc3
4
4
  Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  License: MIT
@@ -16,6 +16,7 @@ Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: fastapi<1.0.0,>=0.115.0
18
18
  Requires-Dist: click<9.0.0,>=8.0.0
19
+ Requires-Dist: psutil<8.0.0,>=7.0.0
19
20
  Requires-Dist: urllib3<3.0.0,>=1.25.3
20
21
  Requires-Dist: python_dateutil<3.0.0,>=2.8.2
21
22
  Requires-Dist: aiohttp<4.0.0,>=3.8.4
@@ -3,6 +3,10 @@
3
3
  .. include:: ../CHANGELOG.md
4
4
  """
5
5
 
6
+ from crypticorn.common.logging import configure_logging
7
+
8
+ configure_logging("crypticorn")
9
+
6
10
  from crypticorn.client import ApiClient
7
11
 
8
12
  __all__ = ["ApiClient"]
@@ -78,10 +78,12 @@ class CreateApiKeyRequest(BaseModel):
78
78
  "read:metrics:tokens",
79
79
  "read:metrics:markets",
80
80
  "read:sentiment",
81
+ "read:admin",
82
+ "write:admin",
81
83
  ]
82
84
  ):
83
85
  raise ValueError(
84
- "each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment')"
86
+ "each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment', 'read:admin', 'write:admin')"
85
87
  )
86
88
  return value
87
89
 
@@ -86,10 +86,12 @@ class GetApiKeys200ResponseInner(BaseModel):
86
86
  "read:metrics:tokens",
87
87
  "read:metrics:markets",
88
88
  "read:sentiment",
89
+ "read:admin",
90
+ "write:admin",
89
91
  ]
90
92
  ):
91
93
  raise ValueError(
92
- "each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment')"
94
+ "each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment', 'read:admin', 'write:admin')"
93
95
  )
94
96
  return value
95
97
 
@@ -10,5 +10,6 @@ from crypticorn.common.exceptions import *
10
10
  from crypticorn.common.pagination import *
11
11
  from crypticorn.common.logging import *
12
12
  from crypticorn.common.ansi_colors import *
13
+ from crypticorn.common.middleware import *
13
14
  from crypticorn.common.router.status_router import router as status_router
14
15
  from crypticorn.common.router.admin_router import router as admin_router
@@ -1,9 +1,6 @@
1
1
  from enum import StrEnum
2
2
  from typing import TYPE_CHECKING
3
3
 
4
- if TYPE_CHECKING:
5
- pass
6
-
7
4
 
8
5
  class AnsiColors(StrEnum):
9
6
  # Regular Text Colors
@@ -75,7 +75,9 @@ class AuthHandler:
75
75
  raise HTTPException(
76
76
  content=ExceptionContent(
77
77
  error=ApiError.INSUFFICIENT_SCOPES,
78
- message="Insufficient scopes to access this resource (required: " + ", ".join(api_scopes) + ")",
78
+ message="Insufficient scopes to access this resource (required: "
79
+ + ", ".join(api_scopes)
80
+ + ")",
79
81
  ),
80
82
  )
81
83
 
@@ -95,28 +95,35 @@ class WebSocketException(HTTPException):
95
95
  async def general_handler(request: Request, exc: Exception) -> JSONResponse:
96
96
  """This is the default exception handler for all exceptions."""
97
97
  body = ExceptionContent(message=str(exc), error=ApiError.UNKNOWN_ERROR)
98
- res = JSONResponse(
99
- status_code=body.enrich().status_code, content=HTTPException(content=body).detail
98
+ res = JSONResponse(
99
+ status_code=body.enrich().status_code,
100
+ content=HTTPException(content=body).detail,
100
101
  )
101
102
  logger.error(f"Response validation error: {res}")
102
103
  return res
103
104
 
104
105
 
105
- async def request_validation_handler(request: Request, exc: RequestValidationError) -> JSONResponse:
106
+ async def request_validation_handler(
107
+ request: Request, exc: RequestValidationError
108
+ ) -> JSONResponse:
106
109
  """This is the exception handler for all request validation errors."""
107
110
  body = ExceptionContent(message=str(exc), error=ApiError.INVALID_DATA_REQUEST)
108
111
  res = JSONResponse(
109
- status_code=body.enrich().status_code, content=HTTPException(content=body).detail
112
+ status_code=body.enrich().status_code,
113
+ content=HTTPException(content=body).detail,
110
114
  )
111
115
  logger.error(f"Response validation error: {res}")
112
116
  return res
113
117
 
114
118
 
115
- async def response_validation_handler(request: Request, exc: ResponseValidationError) -> JSONResponse:
119
+ async def response_validation_handler(
120
+ request: Request, exc: ResponseValidationError
121
+ ) -> JSONResponse:
116
122
  """This is the exception handler for all response validation errors."""
117
123
  body = ExceptionContent(message=str(exc), error=ApiError.INVALID_DATA_RESPONSE)
118
124
  res = JSONResponse(
119
- status_code=body.enrich().status_code, content=HTTPException(content=body).detail
125
+ status_code=body.enrich().status_code,
126
+ content=HTTPException(content=body).detail,
120
127
  )
121
128
  logger.error(f"Response validation error: {res}")
122
129
  return res
@@ -1,8 +1,10 @@
1
+ from __future__ import annotations
2
+
1
3
  # shared_logger.py
2
4
  import logging
3
- from logging import _nameToLevel, _levelToName
4
5
  import sys
5
6
  from contextvars import ContextVar
7
+ from contextlib import asynccontextmanager
6
8
  import json
7
9
  from pydantic import BaseModel
8
10
  from enum import StrEnum
@@ -10,6 +12,7 @@ from crypticorn.common.mixins import ValidateEnumMixin
10
12
  from crypticorn.common.ansi_colors import AnsiColors as C
11
13
  from datetime import datetime
12
14
 
15
+
13
16
  class LogLevel(ValidateEnumMixin, StrEnum):
14
17
  DEBUG = "DEBUG"
15
18
  INFO = "INFO"
@@ -34,11 +37,11 @@ class LogLevel(ValidateEnumMixin, StrEnum):
34
37
 
35
38
  @staticmethod
36
39
  def get_level(level: "LogLevel") -> int:
37
- return _nameToLevel.get(level, logging.INFO)
40
+ return logging._nameToLevel.get(level, logging.INFO)
38
41
 
39
42
  @staticmethod
40
43
  def get_name(level: int) -> "LogLevel":
41
- return LogLevel(_levelToName.get(level, "INFO"))
44
+ return LogLevel(logging._levelToName.get(level, "INFO"))
42
45
 
43
46
 
44
47
  _LOGFORMAT = (
@@ -47,9 +50,7 @@ _LOGFORMAT = (
47
50
  f"%(levelcolor)s%(levelname)s{C.RESET} - "
48
51
  f"%(message)s"
49
52
  )
50
- _PLAIN_LOGFORMAT = (
51
- "%(asctime)s - " "%(name)s - " "%(levelname)s - " "%(message)s"
52
- )
53
+ _PLAIN_LOGFORMAT = "%(asctime)s - " "%(name)s - " "%(levelname)s - " "%(message)s"
53
54
  _DATEFMT = "%Y-%m-%d %H:%M:%S.%f:"
54
55
 
55
56
 
@@ -67,20 +68,26 @@ class CustomFormatter(logging.Formatter):
67
68
  s = dt.strftime(datefmt)
68
69
  return s[:-3] # Trim last 3 digits to get milliseconds
69
70
 
70
- def get_logger(
71
- name: str, fmt: str = _LOGFORMAT, datefmt: str = _DATEFMT,
71
+
72
+ def configure_logging(
73
+ name: str,
74
+ fmt: str = _LOGFORMAT,
75
+ datefmt: str = _DATEFMT,
72
76
  stdout_level: int = logging.INFO,
73
77
  file_level: int = logging.INFO,
74
78
  log_file: str = None,
75
79
  filters: list[logging.Filter] = [],
76
- ) -> logging.Logger:
77
- """Returns crypticorn logger instance."""
80
+ ) -> None:
81
+ """Configures the logging for the application.
82
+ Run this function as early as possible in the application (for example using the `lifespan` parameter in FastAPI).
83
+ Then use can use the default `logging.getLogger(__name__)` method to get the logger.
84
+ """
78
85
  logger = logging.getLogger(name)
79
86
 
80
- if logger.handlers: # clear existing handlers to avoid duplicates
87
+ if logger.handlers: # clear existing handlers to avoid duplicates
81
88
  logger.handlers.clear()
82
89
 
83
- logger.setLevel(min(stdout_level, file_level)) # set to most verbose level
90
+ logger.setLevel(min(stdout_level, file_level)) # set to most verbose level
84
91
 
85
92
  # Configure stdout handler
86
93
  stdout_handler = logging.StreamHandler(sys.stdout)
@@ -93,11 +100,17 @@ def get_logger(
93
100
  # Configure file handler
94
101
  if log_file:
95
102
  os.makedirs(os.path.dirname(log_file), exist_ok=True)
96
- file_handler = logging.RotatingFileHandler(log_file, maxBytes=10*1024*1024, backupCount=5)
103
+ file_handler = logging.RotatingFileHandler(
104
+ log_file, maxBytes=10 * 1024 * 1024, backupCount=5
105
+ )
97
106
  file_handler.setLevel(file_level)
98
107
  file_handler.setFormatter(CustomFormatter(fmt=fmt, datefmt=datefmt))
99
108
  for filter in filters:
100
109
  file_handler.addFilter(filter)
101
110
  logger.addHandler(file_handler)
102
111
 
103
- return logger
112
+
113
+ def disable_logging():
114
+ """Disable logging for the crypticorn logger."""
115
+ logger = logging.getLogger("crypticorn")
116
+ logger.disabled = True
@@ -0,0 +1,28 @@
1
+ from fastapi import FastAPI
2
+ from fastapi.middleware.cors import CORSMiddleware
3
+ from crypticorn.common.logging import configure_logging
4
+ import logging
5
+
6
+
7
+ def add_cors_middleware(app: "FastAPI"):
8
+ app.add_middleware(
9
+ CORSMiddleware,
10
+ allow_origins=[
11
+ "http://localhost:5173", # vite dev server
12
+ "http://localhost:4173", # vite preview server
13
+ ],
14
+ allow_origin_regex="^https:\/\/([a-zA-Z0-9-]+\.)*crypticorn\.(dev|com)\/?$", # matches (multiple or no) subdomains of crypticorn.dev and crypticorn.com
15
+ allow_credentials=True,
16
+ allow_methods=["*"],
17
+ allow_headers=["*"],
18
+ )
19
+
20
+
21
+ async def default_lifespan(app: FastAPI):
22
+ """Default lifespan for the applications.
23
+ This is used to configure the logging for the application.
24
+ To override this, pass a different lifespan to the FastAPI constructor or call this lifespan within a custom lifespan.
25
+ """
26
+ configure_logging(__name__) # for the consuming app
27
+ logger = logging.getLogger(__name__)
28
+ yield
@@ -1,5 +1,6 @@
1
1
  from enum import EnumMeta
2
2
  import logging
3
+ from typing_extensions import deprecated
3
4
 
4
5
  logger = logging.getLogger("uvicorn")
5
6
 
@@ -32,14 +33,14 @@ class ValidateEnumMixin:
32
33
  except ValueError:
33
34
  return False
34
35
 
35
-
36
+ @deprecated("This Mixin will be removed in a future version. And has no effect from now on")
36
37
  class ExcludeEnumMixin:
37
38
  """Mixin to exclude enum from OpenAPI schema. We use this to avoid duplicating enums when generating client code from the openapi spec."""
38
39
 
39
40
  @classmethod
40
41
  def __get_pydantic_json_schema__(cls, core_schema, handler):
41
42
  schema = handler(core_schema)
42
- schema.pop("enum", None)
43
+ #schema.pop("enum", None)
43
44
  return schema
44
45
 
45
46
 
@@ -6,15 +6,12 @@ ONLY ALLOW ACCESS TO THIS ROUTER WITH ADMIN SCOPES.
6
6
  """
7
7
 
8
8
  import os
9
- import sys
10
9
  import pkg_resources
11
10
  import threading
12
11
  import time
13
- import json
14
12
  import psutil
15
- from fastapi import APIRouter, HTTPException, Body, Query
13
+ from fastapi import APIRouter, Query
16
14
  from typing import Literal, Union
17
- from dotenv import dotenv_values
18
15
  from crypticorn.common.logging import LogLevel
19
16
  import logging
20
17
 
@@ -22,6 +19,7 @@ router = APIRouter(tags=["Admin"], prefix="/admin")
22
19
 
23
20
  START_TIME = time.time()
24
21
 
22
+
25
23
  @router.get("/log-level", status_code=200, operation_id="getLogLevel")
26
24
  async def get_logging_level() -> LogLevel:
27
25
  """
@@ -29,14 +27,13 @@ async def get_logging_level() -> LogLevel:
29
27
  """
30
28
  return LogLevel.get_name(logging.getLogger().level)
31
29
 
30
+
32
31
  @router.get("/uptime", operation_id="getUptime", status_code=200)
33
- def get_uptime(
34
- type: Literal["seconds", "human"] = "seconds"
35
- ) -> Union[int, str]:
32
+ def get_uptime(type: Literal["seconds", "human"] = "seconds") -> str:
36
33
  """Return the server uptime in seconds or human-readable form."""
37
34
  uptime_seconds = int(time.time() - START_TIME)
38
35
  if type == "seconds":
39
- return uptime_seconds
36
+ return str(uptime_seconds)
40
37
  elif type == "human":
41
38
  return time.strftime("%H:%M:%S", time.gmtime(uptime_seconds))
42
39
 
@@ -73,7 +70,9 @@ def get_container_limits() -> dict:
73
70
  limits["memory_limit_MB"] = "N/A"
74
71
 
75
72
  try:
76
- with open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us") as f1, open("/sys/fs/cgroup/cpu/cpu.cfs_period_us") as f2:
73
+ with open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us") as f1, open(
74
+ "/sys/fs/cgroup/cpu/cpu.cfs_period_us"
75
+ ) as f2:
77
76
  quota = int(f1.read().strip())
78
77
  period = int(f2.read().strip())
79
78
  limits["cpu_limit_cores"] = quota / period if quota > 0 else "N/A"
@@ -86,11 +85,16 @@ def get_container_limits() -> dict:
86
85
  @router.get("/dependencies", operation_id="getDependencies", status_code=200)
87
86
  def list_installed_packages(
88
87
  include: list[str] = Query(
89
- default=None, description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
88
+ default=None,
89
+ description="List of dependencies to include in the response. If not provided, all installed packages will be returned.",
90
90
  )
91
91
  ) -> list:
92
92
  """Return a list of installed packages and versions."""
93
93
  return sorted(
94
- [{dist.project_name: dist.version} for dist in pkg_resources.working_set if include is None or dist.project_name in include],
94
+ [
95
+ {dist.project_name: dist.version}
96
+ for dist in pkg_resources.working_set
97
+ if include is None or dist.project_name in include
98
+ ],
95
99
  key=lambda x: next(iter(x)),
96
100
  )
@@ -16,9 +16,9 @@ async def ping() -> str:
16
16
  @router.get("/time", operation_id="getTime")
17
17
  async def time(type: Literal["iso", "unix"] = "iso") -> str:
18
18
  """
19
- Returns the current time in the specified format.
19
+ Returns the current time in either ISO or Unix timestamp (seconds) format.
20
20
  """
21
21
  if type == "iso":
22
22
  return datetime.now().isoformat()
23
- else:
23
+ elif type == "unix":
24
24
  return str(int(datetime.now().timestamp()))
@@ -17,6 +17,7 @@ Do not edit the class manually.
17
17
  __version__ = "1.0.0"
18
18
 
19
19
  # import apis into sdk package
20
+ from crypticorn.hive.client.api.admin_api import AdminApi
20
21
  from crypticorn.hive.client.api.data_api import DataApi
21
22
  from crypticorn.hive.client.api.models_api import ModelsApi
22
23
  from crypticorn.hive.client.api.status_api import StatusApi
@@ -46,10 +47,12 @@ from crypticorn.hive.client.models.evaluation import Evaluation
46
47
  from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
47
48
  from crypticorn.hive.client.models.exception_detail import ExceptionDetail
48
49
  from crypticorn.hive.client.models.feature_size import FeatureSize
50
+ from crypticorn.hive.client.models.log_level import LogLevel
49
51
  from crypticorn.hive.client.models.model import Model
50
52
  from crypticorn.hive.client.models.model_create import ModelCreate
51
53
  from crypticorn.hive.client.models.model_status import ModelStatus
52
54
  from crypticorn.hive.client.models.model_update import ModelUpdate
55
+ from crypticorn.hive.client.models.response_getuptime import ResponseGetuptime
53
56
  from crypticorn.hive.client.models.target import Target
54
57
  from crypticorn.hive.client.models.target_info import TargetInfo
55
58
  from crypticorn.hive.client.models.target_type import TargetType
@@ -1,6 +1,7 @@
1
1
  # flake8: noqa
2
2
 
3
3
  # import apis into api package
4
+ from crypticorn.hive.client.api.admin_api import AdminApi
4
5
  from crypticorn.hive.client.api.data_api import DataApi
5
6
  from crypticorn.hive.client.api.models_api import ModelsApi
6
7
  from crypticorn.hive.client.api.status_api import StatusApi