crypticorn 2.8.0rc1__tar.gz → 2.8.0rc2__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.
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/CHANGELOG.md +19 -0
- {crypticorn-2.8.0rc1/crypticorn.egg-info → crypticorn-2.8.0rc2}/PKG-INFO +2 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/__init__.py +4 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/create_api_key_request.py +3 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/__init__.py +1 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/ansi_colors.py +0 -4
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/auth.py +3 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/exceptions.py +13 -6
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/logging.py +27 -14
- crypticorn-2.8.0rc2/crypticorn/common/middleware.py +27 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/router/admin_router.py +14 -10
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/router/status_router.py +2 -2
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2/crypticorn.egg-info}/PKG-INFO +2 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn.egg-info/SOURCES.txt +1 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn.egg-info/requires.txt +1 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/pyproject.toml +1 -1
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/requirements/main.txt +1 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/MANIFEST.in +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/README.md +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/admin_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/auth_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/service_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/user_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api/wallet_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/create_user_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/logout_default_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/token_info200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/update_user_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/user_by_username200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_email_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/whoami200_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/__main__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/init.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/templates/Dockerfile +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/templates/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/templates/auth.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/templates/dependabot.yml +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/cli/templates/ruff.yml +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/decorators.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/enums.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/errors.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/mixins.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/pagination.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/scopes.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/urls.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/common/utils.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api/data_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api/models_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api/status_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/coins.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/data_download_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/data_info.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/data_version.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/data_version_info.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/download_links.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/evaluation.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/evaluation_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/exception_detail.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/feature_size.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/model_create.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/model_status.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/model_update.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/target.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/target_info.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/models/target_type.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/hive/utils.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/change_in_timeframe_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/status_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/symbols_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api/udf_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/change_in_timeframe.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/exception_detail.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/funding_rate.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/ohlcv_history.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/resolution.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/search_symbol.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/sort_direction.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/symbol_group.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/symbol_info.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/symbol_type.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/timeframe.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/models/udf_config.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/klines/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/indicators_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/logs_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/markets_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/status_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api/tokens_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/models/exception_detail.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/models/severity.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/models/time_interval.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/models/trading_status.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/metrics/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api/now_payments_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api/payments_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api/products_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api/status_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/exception_detail.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/payment.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/payment_status.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/product_create.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/product_read.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/product_sub_read.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/product_update.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/provider.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/models/scope.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/pay/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/api_keys_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/bots_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/exchanges_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/notifications_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/orders_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/status_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/strategies_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/api_response.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/configuration.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/exceptions.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/__init__.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/action_model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/bot_model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/bot_status.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/exception_detail.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/exchange_key_model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/execution_ids.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/futures_balance.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/margin_mode.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/notification_model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/order_model.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/order_status.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/post_futures_action.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/spot_trading_action.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/tpsl.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/models/trading_action_type.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/py.typed +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/client/rest.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/trade/main.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn.egg-info/dependency_links.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn.egg-info/entry_points.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn.egg-info/top_level.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/requirements/dev.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/requirements/extra.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/requirements/test.txt +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/setup.cfg +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/tests/test_auth_client.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/tests/test_config.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/tests/test_enums.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/tests/test_errors.py +0 -0
- {crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/tests/test_pagination.py +0 -0
@@ -1,6 +1,25 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
3
|
|
4
|
+
## v2.8.0-rc.2 (2025-05-05)
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
- Add psutil as dependency
|
9
|
+
([`23cf77e`](https://github.com/crypticorn-ai/api-client/commit/23cf77ea002a2d6f8e31cd858a2dcc1890b8d8c1))
|
10
|
+
|
11
|
+
- Centralize cors middleware
|
12
|
+
([`e5aa2d6`](https://github.com/crypticorn-ai/api-client/commit/e5aa2d60254076848530a6d5b9a349058ee45ac7))
|
13
|
+
|
14
|
+
- Run logging configuration in init of the library
|
15
|
+
([`8b725e1`](https://github.com/crypticorn-ai/api-client/commit/8b725e18154d184c8593b8de086b0a789b6e180c))
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
- Provide lifespan event for fastapi apps to configure logging on startup
|
20
|
+
([`9a2e1c4`](https://github.com/crypticorn-ai/api-client/commit/9a2e1c45d87ad1581c0e1646689eba6ca0876564))
|
21
|
+
|
22
|
+
|
4
23
|
## v2.8.0-rc.1 (2025-05-04)
|
5
24
|
|
6
25
|
### Features
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.8.
|
3
|
+
Version: 2.8.0rc2
|
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
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/create_api_key_request.py
RENAMED
@@ -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
|
@@ -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: "
|
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 =
|
99
|
-
status_code=body.enrich().status_code,
|
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(
|
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,
|
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(
|
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,
|
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,9 @@
|
|
1
|
+
from __future__ import annotations
|
1
2
|
# shared_logger.py
|
2
3
|
import logging
|
3
|
-
from logging import _nameToLevel, _levelToName
|
4
4
|
import sys
|
5
5
|
from contextvars import ContextVar
|
6
|
+
from contextlib import asynccontextmanager
|
6
7
|
import json
|
7
8
|
from pydantic import BaseModel
|
8
9
|
from enum import StrEnum
|
@@ -10,6 +11,7 @@ from crypticorn.common.mixins import ValidateEnumMixin
|
|
10
11
|
from crypticorn.common.ansi_colors import AnsiColors as C
|
11
12
|
from datetime import datetime
|
12
13
|
|
14
|
+
|
13
15
|
class LogLevel(ValidateEnumMixin, StrEnum):
|
14
16
|
DEBUG = "DEBUG"
|
15
17
|
INFO = "INFO"
|
@@ -34,11 +36,11 @@ class LogLevel(ValidateEnumMixin, StrEnum):
|
|
34
36
|
|
35
37
|
@staticmethod
|
36
38
|
def get_level(level: "LogLevel") -> int:
|
37
|
-
return _nameToLevel.get(level, logging.INFO)
|
39
|
+
return logging._nameToLevel.get(level, logging.INFO)
|
38
40
|
|
39
41
|
@staticmethod
|
40
42
|
def get_name(level: int) -> "LogLevel":
|
41
|
-
return LogLevel(_levelToName.get(level, "INFO"))
|
43
|
+
return LogLevel(logging._levelToName.get(level, "INFO"))
|
42
44
|
|
43
45
|
|
44
46
|
_LOGFORMAT = (
|
@@ -47,9 +49,7 @@ _LOGFORMAT = (
|
|
47
49
|
f"%(levelcolor)s%(levelname)s{C.RESET} - "
|
48
50
|
f"%(message)s"
|
49
51
|
)
|
50
|
-
_PLAIN_LOGFORMAT = (
|
51
|
-
"%(asctime)s - " "%(name)s - " "%(levelname)s - " "%(message)s"
|
52
|
-
)
|
52
|
+
_PLAIN_LOGFORMAT = "%(asctime)s - " "%(name)s - " "%(levelname)s - " "%(message)s"
|
53
53
|
_DATEFMT = "%Y-%m-%d %H:%M:%S.%f:"
|
54
54
|
|
55
55
|
|
@@ -67,20 +67,26 @@ class CustomFormatter(logging.Formatter):
|
|
67
67
|
s = dt.strftime(datefmt)
|
68
68
|
return s[:-3] # Trim last 3 digits to get milliseconds
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
|
71
|
+
def configure_logging(
|
72
|
+
name: str,
|
73
|
+
fmt: str = _LOGFORMAT,
|
74
|
+
datefmt: str = _DATEFMT,
|
72
75
|
stdout_level: int = logging.INFO,
|
73
76
|
file_level: int = logging.INFO,
|
74
77
|
log_file: str = None,
|
75
78
|
filters: list[logging.Filter] = [],
|
76
|
-
) ->
|
77
|
-
"""
|
79
|
+
) -> None:
|
80
|
+
"""Configures the logging for the application.
|
81
|
+
Run this function as early as possible in the application (for example using the `lifespan` parameter in FastAPI).
|
82
|
+
Then use can use the default `logging.getLogger(__name__)` method to get the logger.
|
83
|
+
"""
|
78
84
|
logger = logging.getLogger(name)
|
79
85
|
|
80
|
-
if logger.handlers:
|
86
|
+
if logger.handlers: # clear existing handlers to avoid duplicates
|
81
87
|
logger.handlers.clear()
|
82
88
|
|
83
|
-
logger.setLevel(min(stdout_level, file_level))
|
89
|
+
logger.setLevel(min(stdout_level, file_level)) # set to most verbose level
|
84
90
|
|
85
91
|
# Configure stdout handler
|
86
92
|
stdout_handler = logging.StreamHandler(sys.stdout)
|
@@ -93,11 +99,18 @@ def get_logger(
|
|
93
99
|
# Configure file handler
|
94
100
|
if log_file:
|
95
101
|
os.makedirs(os.path.dirname(log_file), exist_ok=True)
|
96
|
-
file_handler = logging.RotatingFileHandler(
|
102
|
+
file_handler = logging.RotatingFileHandler(
|
103
|
+
log_file, maxBytes=10 * 1024 * 1024, backupCount=5
|
104
|
+
)
|
97
105
|
file_handler.setLevel(file_level)
|
98
106
|
file_handler.setFormatter(CustomFormatter(fmt=fmt, datefmt=datefmt))
|
99
107
|
for filter in filters:
|
100
108
|
file_handler.addFilter(filter)
|
101
109
|
logger.addHandler(file_handler)
|
102
110
|
|
103
|
-
|
111
|
+
|
112
|
+
def disable_logging():
|
113
|
+
"""Disable logging for the crypticorn logger.
|
114
|
+
"""
|
115
|
+
logger = logging.getLogger("crypticorn")
|
116
|
+
logger.disabled = True
|
@@ -0,0 +1,27 @@
|
|
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
|
+
async def default_lifespan(app: FastAPI):
|
21
|
+
"""Default lifespan for the applications.
|
22
|
+
This is used to configure the logging for the application.
|
23
|
+
To override this, pass a different lifespan to the FastAPI constructor or call this lifespan within a custom lifespan.
|
24
|
+
"""
|
25
|
+
configure_logging(__name__) # for the consuming app
|
26
|
+
logger = logging.getLogger(__name__)
|
27
|
+
yield
|
@@ -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,
|
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,10 +27,9 @@ 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") -> Union[int, 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":
|
@@ -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(
|
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,
|
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
|
-
[
|
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
|
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
|
-
|
23
|
+
elif type == "unix":
|
24
24
|
return str(int(datetime.now().timestamp()))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.8.
|
3
|
+
Version: 2.8.0rc2
|
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
|
@@ -5,7 +5,7 @@ readme = "README.md"
|
|
5
5
|
license = {text = "MIT"}
|
6
6
|
requires-python = ">=3.10"
|
7
7
|
authors = [{name = "Crypticorn", email = "timon@crypticorn.com"}]
|
8
|
-
version = "2.8.0-rc.
|
8
|
+
version = "2.8.0-rc.2"
|
9
9
|
keywords = ["machine learning", "data science", "crypto", "modelling"]
|
10
10
|
dynamic = ["dependencies", "optional-dependencies"]
|
11
11
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/add_wallet200_response.py
RENAMED
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/add_wallet_request.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/authorize_user_request.py
RENAMED
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/create_user_request.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/logout_default_response.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/token_info200_response.py
RENAMED
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/unlink_wallet_request.py
RENAMED
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/update_user_request.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify200_response.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_email_request.py
RENAMED
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/verify_wallet_request.py
RENAMED
File without changes
|
File without changes
|
{crypticorn-2.8.0rc1 → crypticorn-2.8.0rc2}/crypticorn/auth/client/models/whoami200_response.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|