openbb-core 1.2.3__tar.gz → 1.2.4__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.
- {openbb_core-1.2.3 → openbb_core-1.2.4}/PKG-INFO +4 -4
- {openbb_core-1.2.3 → openbb_core-1.2.4}/README.md +2 -2
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/command_runner.py +1 -73
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/handlers/path_tracking_file_handler.py +1 -1
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/api_settings.py +2 -2
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/credentials.py +28 -26
- openbb_core-1.2.4/openbb_core/app/model/defaults.py +46 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/provider_interface.py +2 -2
- openbb_core-1.2.4/openbb_core/app/static/container.py +82 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/package_builder.py +15 -14
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/utils/decorators.py +11 -2
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/registry_map.py +7 -9
- openbb_core-1.2.4/openbb_core/provider/standard_models/balance_sheet_growth.py +47 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/cash_flow_growth.py +47 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/central_bank_holdings.py +30 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/consumer_price_index.py +56 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/house_price_index.py +55 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/immediate_interest_rate.py +45 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/income_statement_growth.py +47 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/retail_prices.py +56 -0
- openbb_core-1.2.4/openbb_core/provider/standard_models/share_price_index.py +49 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/unemployment.py +15 -5
- {openbb_core-1.2.3 → openbb_core-1.2.4}/pyproject.toml +2 -2
- openbb_core-1.2.3/openbb_core/app/model/defaults.py +0 -19
- openbb_core-1.2.3/openbb_core/app/static/container.py +0 -41
- openbb_core-1.2.3/openbb_core/provider/standard_models/balance_sheet_growth.py +0 -137
- openbb_core-1.2.3/openbb_core/provider/standard_models/cash_flow_growth.py +0 -124
- openbb_core-1.2.3/openbb_core/provider/standard_models/cpi.py +0 -128
- openbb_core-1.2.3/openbb_core/provider/standard_models/income_statement_growth.py +0 -123
- openbb_core-1.2.3/openbb_core/provider/standard_models/upcoming_release_days.py +0 -23
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/app_loader.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/auth/user.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/dependency/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/dependency/coverage.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/dependency/system.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/exception_handlers.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/rest_api.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/commands.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/coverage.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/helpers/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/helpers/coverage_helpers.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/system.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/api/router/user.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/constants.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/deprecation.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/extension_loader.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/formatters/formatter_with_exceptions.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/handlers/posthog_handler.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/handlers_manager.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/logging_service.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/models/logging_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/utils/expired_files.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/utils/utils.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/error.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/results.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/singleton.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/tagged.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/abstract/warning.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/charts/chart.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/charts/charting_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/command_context.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/example.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/extension.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/field.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/hub/hub_session.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/hub/hub_user_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/metadata.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/obbject.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/preferences.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/profile.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/python_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/results/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/results/empty.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/system_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/model/user_settings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/query.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/router.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/service/auth_service.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/service/hub_service.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/service/system_service.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/service/user_service.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/account.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/app_factory.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/coverage.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/reference_loader.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/utils/console.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/utils/filters.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/static/utils/linters.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/utils.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/version.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/env.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/annotated_result.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/data.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/fetcher.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/provider.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/abstract/query_params.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/py.typed +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/query_executor.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/registry.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/ameribor_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/analyst_estimates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/analyst_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/available_indicators.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/available_indices.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/balance_of_payments.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/balance_sheet.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/bond_prices.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/bond_reference.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/bond_trades.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/calendar_dividend.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/calendar_earnings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/calendar_ipo.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/calendar_splits.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/cash_flow.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/cik_map.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/company_filings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/company_news.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/company_overview.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/compare_company_facts.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/compare_groups.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/composite_leading_indicator.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/cot.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/cot_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/country_profile.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/cp.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/crypto_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/crypto_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/currency_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/currency_pairs.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/currency_reference_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/currency_snapshots.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/discovery_filings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/dwpcr_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/earnings_call_transcript.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/ecb_interest_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/economic_calendar.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/economic_indicators.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_ftd.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_info.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_nbbo.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_ownership.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_peers.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_performance.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_quote.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_screener.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_short_interest.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/equity_valuation_multiples.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/esg_risk_rating.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/esg_score.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/esg_sector.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/estr_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_countries.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_equity_exposure.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_historical_nav.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_holdings.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_holdings_date.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_info.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_performance.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/etf_sectors.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/eu_yield_curve.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/executive_compensation.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/fed_projections.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/fed_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/ffrmc.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/financial_attributes.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/financial_ratios.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/form_13FHR.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/forward_ebitda_estimates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/forward_eps_estimates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/forward_pe_estimates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/forward_sales_estimates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/fred_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/fred_series.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/futures_curve.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/futures_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/gdp_forecast.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/gdp_nominal.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/gdp_real.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/historical_attributes.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/historical_dividends.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/historical_employees.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/historical_eps.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/historical_splits.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/hqm.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/ice_bofa.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/income_statement.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_constituents.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_historical.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_info.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_search.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_sectors.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/index_snapshots.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/industry_pe.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/insider_trading.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/institutional_ownership.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/iorb_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/key_executives.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/key_metrics.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/latest_attributes.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/lbma_fixing.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/long_term_interest_rate.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/market_indices.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/market_movers.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/market_snapshots.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/money_measures.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/moody.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/options_chains.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/options_unusual.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/otc_aggregate.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/price_target.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/price_target_consensus.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/recent_performance.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/reported_financials.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/revenue_business_line.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/revenue_geographic.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/risk_premium.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/search_attributes.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/search_financial_attributes.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/sector_pe.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/sector_performance.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/share_statistics.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/short_term_interest_rate.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/short_volume.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/sofr_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/sonia_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/sp500_multiples.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/spot.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/symbol_map.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/tbffr.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/tmc.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/top_retail.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/trailing_dividend_yield.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/treasury_auctions.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/treasury_prices.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/treasury_rates.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/us_yield_curve.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/world_news.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/standard_models/yield_curve.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/utils/__init__.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/utils/client.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/utils/descriptions.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/utils/errors.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/provider/utils/helpers.py +0 -0
- {openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: openbb-core
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: OpenBB package with core functionality.
|
|
5
5
|
License: AGPL-3.0-only
|
|
6
6
|
Author: OpenBB Team
|
|
@@ -24,7 +24,7 @@ Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
|
|
|
24
24
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
25
25
|
Requires-Dist: python-multipart (>=0.0.7,<0.0.8)
|
|
26
26
|
Requires-Dist: requests (>=2.32.1,<3.0.0)
|
|
27
|
-
Requires-Dist: ruff (>=0.1.6
|
|
27
|
+
Requires-Dist: ruff (>=0.1.6)
|
|
28
28
|
Requires-Dist: uuid7 (>=0.1.0,<0.2.0)
|
|
29
29
|
Requires-Dist: uvicorn (>=0.24,<0.25)
|
|
30
30
|
Requires-Dist: websockets (>=12.0,<13.0)
|
|
@@ -74,7 +74,7 @@ We welcome contributions! If you're looking to contribute, please:
|
|
|
74
74
|
- Ensure your code does not negatively impact performance.
|
|
75
75
|
- Test your contributions thoroughly.
|
|
76
76
|
|
|
77
|
-
Please refer to our [Contributing Guidelines](https://docs.openbb.co/platform/
|
|
77
|
+
Please refer to our [Contributing Guidelines](https://docs.openbb.co/platform/developer_guide/contributing).
|
|
78
78
|
|
|
79
79
|
### Collaboration
|
|
80
80
|
|
|
@@ -82,7 +82,7 @@ Engage with the development team and the community. Be open to feedback and coll
|
|
|
82
82
|
|
|
83
83
|
### Support
|
|
84
84
|
|
|
85
|
-
For support, questions, or more information, please visit [OpenBB Platform Documentation](https://docs.openbb.co/platform
|
|
85
|
+
For support, questions, or more information, please visit [OpenBB Platform Documentation](https://docs.openbb.co/platform).
|
|
86
86
|
|
|
87
87
|
### License
|
|
88
88
|
|
|
@@ -42,7 +42,7 @@ We welcome contributions! If you're looking to contribute, please:
|
|
|
42
42
|
- Ensure your code does not negatively impact performance.
|
|
43
43
|
- Test your contributions thoroughly.
|
|
44
44
|
|
|
45
|
-
Please refer to our [Contributing Guidelines](https://docs.openbb.co/platform/
|
|
45
|
+
Please refer to our [Contributing Guidelines](https://docs.openbb.co/platform/developer_guide/contributing).
|
|
46
46
|
|
|
47
47
|
### Collaboration
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ Engage with the development team and the community. Be open to feedback and coll
|
|
|
50
50
|
|
|
51
51
|
### Support
|
|
52
52
|
|
|
53
|
-
For support, questions, or more information, please visit [OpenBB Platform Documentation](https://docs.openbb.co/platform
|
|
53
|
+
For support, questions, or more information, please visit [OpenBB Platform Documentation](https://docs.openbb.co/platform).
|
|
54
54
|
|
|
55
55
|
### License
|
|
56
56
|
|
|
@@ -21,7 +21,7 @@ from openbb_core.app.model.metadata import Metadata
|
|
|
21
21
|
from openbb_core.app.model.obbject import OBBject
|
|
22
22
|
from openbb_core.app.model.system_settings import SystemSettings
|
|
23
23
|
from openbb_core.app.model.user_settings import UserSettings
|
|
24
|
-
from openbb_core.app.provider_interface import ExtraParams
|
|
24
|
+
from openbb_core.app.provider_interface import ExtraParams
|
|
25
25
|
from openbb_core.app.router import CommandMap
|
|
26
26
|
from openbb_core.app.service.system_service import SystemService
|
|
27
27
|
from openbb_core.app.service.user_service import UserService
|
|
@@ -117,68 +117,6 @@ class ParametersBuilder:
|
|
|
117
117
|
|
|
118
118
|
return kwargs
|
|
119
119
|
|
|
120
|
-
@staticmethod
|
|
121
|
-
def update_provider_choices(
|
|
122
|
-
func: Callable,
|
|
123
|
-
command_coverage: Dict[str, List[str]],
|
|
124
|
-
route: str,
|
|
125
|
-
kwargs: Dict[str, Any],
|
|
126
|
-
route_default: Optional[Dict[str, Optional[str]]],
|
|
127
|
-
) -> Dict[str, Any]:
|
|
128
|
-
"""Update the provider choices with the available providers and set default provider."""
|
|
129
|
-
|
|
130
|
-
def _needs_provider(func: Callable) -> bool:
|
|
131
|
-
"""Check if the function needs a provider."""
|
|
132
|
-
parameters = signature(func).parameters.keys()
|
|
133
|
-
return "provider_choices" in parameters
|
|
134
|
-
|
|
135
|
-
def _has_provider(kwargs: Dict[str, Any]) -> bool:
|
|
136
|
-
"""Check if the kwargs already have a provider."""
|
|
137
|
-
provider_choices = kwargs.get("provider_choices")
|
|
138
|
-
|
|
139
|
-
if isinstance(provider_choices, dict): # when in python
|
|
140
|
-
return provider_choices.get("provider", None) is not None
|
|
141
|
-
if isinstance(provider_choices, object): # when running as fastapi
|
|
142
|
-
return getattr(provider_choices, "provider", None) is not None
|
|
143
|
-
return False
|
|
144
|
-
|
|
145
|
-
def _get_first_provider() -> Optional[str]:
|
|
146
|
-
"""Get the first available provider."""
|
|
147
|
-
available_providers = ProviderInterface().available_providers
|
|
148
|
-
return available_providers[0] if available_providers else None
|
|
149
|
-
|
|
150
|
-
def _get_default_provider(
|
|
151
|
-
command_coverage: Dict[str, List[str]],
|
|
152
|
-
route_default: Optional[Dict[str, Optional[str]]],
|
|
153
|
-
) -> Optional[str]:
|
|
154
|
-
"""
|
|
155
|
-
Get the default provider for the given route.
|
|
156
|
-
|
|
157
|
-
Either pick it from the user defaults or from the command coverage.
|
|
158
|
-
"""
|
|
159
|
-
cmd_cov_given_route = command_coverage.get(route)
|
|
160
|
-
command_cov_provider = (
|
|
161
|
-
cmd_cov_given_route[0] if cmd_cov_given_route else None
|
|
162
|
-
)
|
|
163
|
-
|
|
164
|
-
if route_default:
|
|
165
|
-
return route_default.get("provider", None) or command_cov_provider # type: ignore
|
|
166
|
-
|
|
167
|
-
return command_cov_provider
|
|
168
|
-
|
|
169
|
-
if not _has_provider(kwargs) and _needs_provider(func):
|
|
170
|
-
provider = (
|
|
171
|
-
_get_default_provider(
|
|
172
|
-
command_coverage,
|
|
173
|
-
route_default,
|
|
174
|
-
)
|
|
175
|
-
if route in command_coverage
|
|
176
|
-
else _get_first_provider()
|
|
177
|
-
)
|
|
178
|
-
kwargs["provider_choices"] = {"provider": provider}
|
|
179
|
-
|
|
180
|
-
return kwargs
|
|
181
|
-
|
|
182
120
|
@staticmethod
|
|
183
121
|
def _warn_kwargs(
|
|
184
122
|
extra_params: Dict[str, Any],
|
|
@@ -246,14 +184,12 @@ class ParametersBuilder:
|
|
|
246
184
|
args: Tuple[Any, ...],
|
|
247
185
|
execution_context: ExecutionContext,
|
|
248
186
|
func: Callable,
|
|
249
|
-
route: str,
|
|
250
187
|
kwargs: Dict[str, Any],
|
|
251
188
|
) -> Dict[str, Any]:
|
|
252
189
|
"""Build the parameters for a function."""
|
|
253
190
|
func = cls.get_polished_func(func=func)
|
|
254
191
|
system_settings = execution_context.system_settings
|
|
255
192
|
user_settings = execution_context.user_settings
|
|
256
|
-
command_map = execution_context.command_map
|
|
257
193
|
|
|
258
194
|
kwargs = cls.merge_args_and_kwargs(
|
|
259
195
|
func=func,
|
|
@@ -266,13 +202,6 @@ class ParametersBuilder:
|
|
|
266
202
|
system_settings=system_settings,
|
|
267
203
|
user_settings=user_settings,
|
|
268
204
|
)
|
|
269
|
-
kwargs = cls.update_provider_choices(
|
|
270
|
-
func=func,
|
|
271
|
-
command_coverage=command_map.command_coverage,
|
|
272
|
-
route=route,
|
|
273
|
-
kwargs=kwargs,
|
|
274
|
-
route_default=user_settings.defaults.routes.get(route, None),
|
|
275
|
-
)
|
|
276
205
|
kwargs = cls.validate_kwargs(
|
|
277
206
|
func=func,
|
|
278
207
|
kwargs=kwargs,
|
|
@@ -364,7 +293,6 @@ class StaticCommandRunner:
|
|
|
364
293
|
args=args,
|
|
365
294
|
execution_context=execution_context,
|
|
366
295
|
func=func,
|
|
367
|
-
route=route,
|
|
368
296
|
kwargs=kwargs,
|
|
369
297
|
)
|
|
370
298
|
|
{openbb_core-1.2.3 → openbb_core-1.2.4}/openbb_core/app/logs/handlers/path_tracking_file_handler.py
RENAMED
|
@@ -5,7 +5,7 @@ from copy import deepcopy
|
|
|
5
5
|
from logging.handlers import TimedRotatingFileHandler
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
# IMPORTATION
|
|
8
|
+
# IMPORTATION THIRD PARTY
|
|
9
9
|
# IMPORTATION INTERNAL
|
|
10
10
|
from openbb_core.app.logs.models.logging_settings import LoggingSettings
|
|
11
11
|
from openbb_core.app.logs.utils.expired_files import (
|
|
@@ -20,7 +20,7 @@ class Servers(BaseModel):
|
|
|
20
20
|
|
|
21
21
|
model_config = ConfigDict(frozen=True)
|
|
22
22
|
|
|
23
|
-
url: str = "
|
|
23
|
+
url: str = ""
|
|
24
24
|
description: str = "Local OpenBB development server"
|
|
25
25
|
|
|
26
26
|
|
|
@@ -36,7 +36,7 @@ class APISettings(BaseModel):
|
|
|
36
36
|
contact_name: str = "OpenBB Team"
|
|
37
37
|
contact_url: str = "https://openbb.co"
|
|
38
38
|
contact_email: str = "hello@openbb.co"
|
|
39
|
-
license_name: str = "
|
|
39
|
+
license_name: str = "AGPLv3"
|
|
40
40
|
license_url: str = (
|
|
41
41
|
"https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/LICENSE"
|
|
42
42
|
)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import traceback
|
|
4
4
|
import warnings
|
|
5
|
-
from typing import Dict,
|
|
5
|
+
from typing import Dict, List, Optional, Tuple
|
|
6
6
|
|
|
7
7
|
from pydantic import (
|
|
8
8
|
BaseModel,
|
|
@@ -36,37 +36,39 @@ OBBSecretStr = Annotated[
|
|
|
36
36
|
class CredentialsLoader:
|
|
37
37
|
"""Here we create the Credentials model."""
|
|
38
38
|
|
|
39
|
-
credentials: Dict[str,
|
|
39
|
+
credentials: Dict[str, List[str]] = {}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
def prepare(
|
|
43
|
-
credentials: Dict[str, Set[str]],
|
|
44
|
-
) -> Dict[str, Tuple[object, None]]:
|
|
41
|
+
def format_credentials(self) -> Dict[str, Tuple[object, None]]:
|
|
45
42
|
"""Prepare credentials map to be used in the Credentials model."""
|
|
46
43
|
formatted: Dict[str, Tuple[object, None]] = {}
|
|
47
|
-
for
|
|
48
|
-
for
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
for c_origin, c_list in self.credentials.items():
|
|
45
|
+
for c_name in c_list:
|
|
46
|
+
if c_name in formatted:
|
|
47
|
+
warnings.warn(
|
|
48
|
+
message=f"Skipping '{c_name}', credential already in use.",
|
|
49
|
+
category=OpenBBWarning,
|
|
50
|
+
)
|
|
51
|
+
continue
|
|
52
|
+
formatted[c_name] = (
|
|
53
53
|
Optional[OBBSecretStr],
|
|
54
|
-
Field(
|
|
55
|
-
default=None, description=origin, alias=c.upper()
|
|
56
|
-
), # register the credential origin (obbject, providers)
|
|
54
|
+
Field(default=None, description=c_origin, alias=c_name.upper()),
|
|
57
55
|
)
|
|
58
56
|
|
|
59
|
-
return formatted
|
|
57
|
+
return dict(sorted(formatted.items()))
|
|
60
58
|
|
|
61
59
|
def from_obbject(self) -> None:
|
|
62
60
|
"""Load credentials from OBBject extensions."""
|
|
63
|
-
|
|
64
|
-
for name, entry in ExtensionLoader().obbject_objects.items(): # type: ignore[attr-defined]
|
|
61
|
+
for ext_name, ext in ExtensionLoader().obbject_objects.items(): # type: ignore[attr-defined]
|
|
65
62
|
try:
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
if ext_name in self.credentials:
|
|
64
|
+
warnings.warn(
|
|
65
|
+
message=f"Skipping '{ext_name}', name already in user.",
|
|
66
|
+
category=OpenBBWarning,
|
|
67
|
+
)
|
|
68
|
+
continue
|
|
69
|
+
self.credentials[ext_name] = ext.credentials
|
|
68
70
|
except Exception as e:
|
|
69
|
-
msg = f"Error loading extension: {
|
|
71
|
+
msg = f"Error loading extension: {ext_name}\n"
|
|
70
72
|
if Env().DEBUG_MODE:
|
|
71
73
|
traceback.print_exception(type(e), e, e.__traceback__)
|
|
72
74
|
raise LoadingError(msg + f"\033[91m{e}\033[0m") from e
|
|
@@ -77,20 +79,20 @@ class CredentialsLoader:
|
|
|
77
79
|
|
|
78
80
|
def from_providers(self) -> None:
|
|
79
81
|
"""Load credentials from providers."""
|
|
80
|
-
self.credentials
|
|
81
|
-
for c in ProviderInterface().credentials:
|
|
82
|
-
self.credentials["providers"].add(c)
|
|
82
|
+
self.credentials = ProviderInterface().credentials
|
|
83
83
|
|
|
84
84
|
def load(self) -> BaseModel:
|
|
85
85
|
"""Load credentials from providers."""
|
|
86
86
|
# We load providers first to give them priority choosing credential names
|
|
87
87
|
self.from_providers()
|
|
88
88
|
self.from_obbject()
|
|
89
|
-
|
|
89
|
+
model = create_model( # type: ignore
|
|
90
90
|
"Credentials",
|
|
91
91
|
__config__=ConfigDict(validate_assignment=True, populate_by_name=True),
|
|
92
|
-
**self.
|
|
92
|
+
**self.format_credentials(),
|
|
93
93
|
)
|
|
94
|
+
model.origins = self.credentials
|
|
95
|
+
return model
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
_Credentials = CredentialsLoader().load()
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Defaults model."""
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from warnings import warn
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|
7
|
+
|
|
8
|
+
from openbb_core.app.model.abstract.warning import OpenBBWarning
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Defaults(BaseModel):
|
|
12
|
+
"""Defaults."""
|
|
13
|
+
|
|
14
|
+
model_config = ConfigDict(validate_assignment=True, populate_by_name=True)
|
|
15
|
+
|
|
16
|
+
commands: Dict[str, Dict[str, Optional[List[str]]]] = Field(
|
|
17
|
+
default_factory=dict,
|
|
18
|
+
alias="routes",
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def __repr__(self) -> str:
|
|
22
|
+
"""Return string representation."""
|
|
23
|
+
return f"{self.__class__.__name__}\n\n" + "\n".join(
|
|
24
|
+
f"{k}: {v}" for k, v in self.model_dump().items()
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
@model_validator(mode="before")
|
|
28
|
+
@classmethod
|
|
29
|
+
def validate_before(cls, values: dict) -> dict:
|
|
30
|
+
"""Validate model (before)."""
|
|
31
|
+
key = "commands"
|
|
32
|
+
if "routes" in values:
|
|
33
|
+
warn(
|
|
34
|
+
message="'routes' is deprecated. Use 'commands' instead.",
|
|
35
|
+
category=OpenBBWarning,
|
|
36
|
+
)
|
|
37
|
+
key = "routes"
|
|
38
|
+
|
|
39
|
+
new_values: Dict[str, Dict[str, Optional[List[str]]]] = {"commands": {}}
|
|
40
|
+
for k, v in values.get(key, {}).items():
|
|
41
|
+
clean_k = k.strip("/").replace("/", ".")
|
|
42
|
+
provider = v.get("provider") if v else None
|
|
43
|
+
if isinstance(provider, str):
|
|
44
|
+
v["provider"] = [provider]
|
|
45
|
+
new_values["commands"][clean_k] = v
|
|
46
|
+
return new_values
|
|
@@ -126,8 +126,8 @@ class ProviderInterface(metaclass=SingletonMeta):
|
|
|
126
126
|
return self._map
|
|
127
127
|
|
|
128
128
|
@property
|
|
129
|
-
def credentials(self) -> List[str]:
|
|
130
|
-
"""
|
|
129
|
+
def credentials(self) -> Dict[str, List[str]]:
|
|
130
|
+
"""Map providers to credentials."""
|
|
131
131
|
return self._registry_map.credentials
|
|
132
132
|
|
|
133
133
|
@property
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Container class."""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Optional, Tuple
|
|
4
|
+
|
|
5
|
+
from openbb_core.app.command_runner import CommandRunner
|
|
6
|
+
from openbb_core.app.model.abstract.error import OpenBBError
|
|
7
|
+
from openbb_core.app.model.obbject import OBBject
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Container:
|
|
11
|
+
"""Container class for the command runner session."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, command_runner: CommandRunner) -> None:
|
|
14
|
+
"""Initialize the container."""
|
|
15
|
+
self._command_runner = command_runner
|
|
16
|
+
OBBject._user_settings = command_runner.user_settings
|
|
17
|
+
OBBject._system_settings = command_runner.system_settings
|
|
18
|
+
|
|
19
|
+
def _run(self, *args, **kwargs) -> Any:
|
|
20
|
+
"""Run a command in the container."""
|
|
21
|
+
obbject = self._command_runner.sync_run(*args, **kwargs)
|
|
22
|
+
output_type = self._command_runner.user_settings.preferences.output_type
|
|
23
|
+
if output_type == "OBBject":
|
|
24
|
+
return obbject
|
|
25
|
+
return getattr(obbject, "to_" + output_type)()
|
|
26
|
+
|
|
27
|
+
def _check_credentials(self, provider: str) -> Optional[bool]:
|
|
28
|
+
"""Check required credentials are populated."""
|
|
29
|
+
credentials = self._command_runner.user_settings.credentials
|
|
30
|
+
if provider not in credentials.origins:
|
|
31
|
+
return None
|
|
32
|
+
required = credentials.origins.get(provider)
|
|
33
|
+
return all(getattr(credentials, r, None) for r in required)
|
|
34
|
+
|
|
35
|
+
def _get_provider(
|
|
36
|
+
self, choice: Optional[str], command: str, default_priority: Tuple[str, ...]
|
|
37
|
+
) -> str:
|
|
38
|
+
"""Get the provider to use in execution.
|
|
39
|
+
|
|
40
|
+
If no choice is specified, the configured priority list is used. A provider is used
|
|
41
|
+
when all of its required credentials are populated.
|
|
42
|
+
|
|
43
|
+
Parameters
|
|
44
|
+
----------
|
|
45
|
+
choice: Optional[str]
|
|
46
|
+
The provider choice, for example 'fmp'.
|
|
47
|
+
command: str
|
|
48
|
+
The command to get the provider for, for example 'equity.price.historical'
|
|
49
|
+
default_priority: Tuple[str, ...]
|
|
50
|
+
A tuple of available providers for the given command to use as default priority list.
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
-------
|
|
54
|
+
str
|
|
55
|
+
The provider to use in the command.
|
|
56
|
+
|
|
57
|
+
Raises
|
|
58
|
+
------
|
|
59
|
+
OpenBBError
|
|
60
|
+
Raises error when all the providers in the priority list failed.
|
|
61
|
+
"""
|
|
62
|
+
if choice is None:
|
|
63
|
+
commands = self._command_runner.user_settings.defaults.commands
|
|
64
|
+
providers = (
|
|
65
|
+
commands.get(command, {}).get("provider", []) or default_priority
|
|
66
|
+
)
|
|
67
|
+
tries = []
|
|
68
|
+
for p in providers:
|
|
69
|
+
result = self._check_credentials(p)
|
|
70
|
+
if result:
|
|
71
|
+
return p
|
|
72
|
+
elif result is False:
|
|
73
|
+
tries.append((p, "missing credentials"))
|
|
74
|
+
else:
|
|
75
|
+
tries.append((p, "not found"))
|
|
76
|
+
|
|
77
|
+
msg = "\n ".join([f"* '{pair[0]}' -> {pair[1]}" for pair in tries])
|
|
78
|
+
raise OpenBBError(
|
|
79
|
+
f"Provider fallback failed, please specify the provider or update credentials.\n"
|
|
80
|
+
f"[Providers]\n {msg}"
|
|
81
|
+
)
|
|
82
|
+
return choice
|
|
@@ -599,8 +599,7 @@ class MethodDefinition:
|
|
|
599
599
|
fields = param.annotation.__args__[0].__dataclass_fields__
|
|
600
600
|
field = fields["provider"]
|
|
601
601
|
type_ = getattr(field, "type")
|
|
602
|
-
|
|
603
|
-
first = args[0] if args else None
|
|
602
|
+
default_priority = getattr(type_, "__args__")
|
|
604
603
|
formatted["provider"] = Parameter(
|
|
605
604
|
name="provider",
|
|
606
605
|
kind=Parameter.POSITIONAL_OR_KEYWORD,
|
|
@@ -608,10 +607,9 @@ class MethodDefinition:
|
|
|
608
607
|
Optional[MethodDefinition.get_type(field)],
|
|
609
608
|
OpenBBField(
|
|
610
609
|
description=(
|
|
611
|
-
"The provider to use
|
|
612
|
-
|
|
613
|
-
"
|
|
614
|
-
""
|
|
610
|
+
"The provider to use, by default None. "
|
|
611
|
+
"If None, the priority list configured in the settings is used. "
|
|
612
|
+
f"Default priority: {', '.join(default_priority)}."
|
|
615
613
|
),
|
|
616
614
|
),
|
|
617
615
|
],
|
|
@@ -828,10 +826,11 @@ class MethodDefinition:
|
|
|
828
826
|
elif name == "provider_choices":
|
|
829
827
|
field = param.annotation.__args__[0].__dataclass_fields__["provider"]
|
|
830
828
|
available = field.type.__args__
|
|
829
|
+
cmd = path.strip("/").replace("/", ".")
|
|
831
830
|
code += " provider_choices={\n"
|
|
832
831
|
code += ' "provider": self._get_provider(\n'
|
|
833
832
|
code += " provider,\n"
|
|
834
|
-
code += f' "{
|
|
833
|
+
code += f' "{cmd}",\n'
|
|
835
834
|
code += f" {available},\n"
|
|
836
835
|
code += " )\n"
|
|
837
836
|
code += " },\n"
|
|
@@ -1397,7 +1396,7 @@ class ReferenceGenerator:
|
|
|
1397
1396
|
)
|
|
1398
1397
|
|
|
1399
1398
|
@classmethod
|
|
1400
|
-
def _get_provider_parameter_info(cls, model: str) -> Dict[str,
|
|
1399
|
+
def _get_provider_parameter_info(cls, model: str) -> Dict[str, Any]:
|
|
1401
1400
|
"""Get the name, type, description, default value and optionality information for the provider parameter.
|
|
1402
1401
|
|
|
1403
1402
|
Parameters
|
|
@@ -1407,7 +1406,7 @@ class ReferenceGenerator:
|
|
|
1407
1406
|
|
|
1408
1407
|
Returns
|
|
1409
1408
|
-------
|
|
1410
|
-
Dict[str,
|
|
1409
|
+
Dict[str, Any]
|
|
1411
1410
|
Dictionary of the provider parameter information
|
|
1412
1411
|
"""
|
|
1413
1412
|
pi_model_provider = cls.pi.model_providers[model]
|
|
@@ -1417,18 +1416,18 @@ class ReferenceGenerator:
|
|
|
1417
1416
|
field_type = DocstringGenerator.get_field_type(
|
|
1418
1417
|
provider_params_field.type, False, "website"
|
|
1419
1418
|
)
|
|
1420
|
-
|
|
1419
|
+
default_priority = provider_params_field.type.__args__[0]
|
|
1421
1420
|
description = (
|
|
1422
|
-
"The provider to use
|
|
1423
|
-
"If None, the
|
|
1424
|
-
f"
|
|
1421
|
+
"The provider to use, by default None. "
|
|
1422
|
+
"If None, the priority list configured in the settings is used. "
|
|
1423
|
+
f"Default priority: {', '.join(default_priority)}."
|
|
1425
1424
|
)
|
|
1426
1425
|
|
|
1427
1426
|
provider_parameter_info = {
|
|
1428
1427
|
"name": name,
|
|
1429
1428
|
"type": field_type,
|
|
1430
1429
|
"description": description,
|
|
1431
|
-
"default":
|
|
1430
|
+
"default": None,
|
|
1432
1431
|
"optional": True,
|
|
1433
1432
|
}
|
|
1434
1433
|
|
|
@@ -1686,6 +1685,8 @@ class ReferenceGenerator:
|
|
|
1686
1685
|
reference: Dict[str, Dict] = {}
|
|
1687
1686
|
|
|
1688
1687
|
for path, route in route_map.items():
|
|
1688
|
+
# Initialize the provider parameter fields as an empty dictionary
|
|
1689
|
+
provider_parameter_fields = {"type": ""}
|
|
1689
1690
|
# Initialize the reference fields as empty dictionaries
|
|
1690
1691
|
reference[path] = {field: {} for field in cls.REFERENCE_FIELDS}
|
|
1691
1692
|
# Route method is used to distinguish between GET and POST methods
|
|
@@ -65,11 +65,20 @@ def exception_handler(func: Callable[P, R]) -> Callable[P, R]:
|
|
|
65
65
|
[
|
|
66
66
|
str(i)
|
|
67
67
|
for i in err.get("loc", ())
|
|
68
|
-
if i
|
|
68
|
+
if i
|
|
69
|
+
not in (
|
|
70
|
+
"standard_params",
|
|
71
|
+
"extra_params",
|
|
72
|
+
"provider_choices",
|
|
73
|
+
)
|
|
69
74
|
]
|
|
70
75
|
)
|
|
71
|
-
_input = err.get("input", "")
|
|
72
76
|
msg = err.get("msg", "")
|
|
77
|
+
_input = (
|
|
78
|
+
"..."
|
|
79
|
+
if msg == "Missing required argument"
|
|
80
|
+
else err.get("input", "")
|
|
81
|
+
)
|
|
73
82
|
error_list.append(f"[Arg] {loc} -> input: {_input} -> {msg}")
|
|
74
83
|
error_list.insert(0, validation_error)
|
|
75
84
|
error_str = "\n".join(error_list)
|
|
@@ -40,8 +40,8 @@ class RegistryMap:
|
|
|
40
40
|
return self._available_providers
|
|
41
41
|
|
|
42
42
|
@property
|
|
43
|
-
def credentials(self) -> List[str]:
|
|
44
|
-
"""Get
|
|
43
|
+
def credentials(self) -> Dict[str, List[str]]:
|
|
44
|
+
"""Get map of providers to credentials."""
|
|
45
45
|
return self._credentials
|
|
46
46
|
|
|
47
47
|
@property
|
|
@@ -59,13 +59,11 @@ class RegistryMap:
|
|
|
59
59
|
"""Get available models."""
|
|
60
60
|
return self._models
|
|
61
61
|
|
|
62
|
-
def _get_credentials(self, registry: Registry) -> List[str]:
|
|
63
|
-
"""Get
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
cred_list.append(c)
|
|
68
|
-
return cred_list
|
|
62
|
+
def _get_credentials(self, registry: Registry) -> Dict[str, List[str]]:
|
|
63
|
+
"""Get map of providers to credentials."""
|
|
64
|
+
return {
|
|
65
|
+
name: provider.credentials for name, provider in registry.providers.items()
|
|
66
|
+
}
|
|
69
67
|
|
|
70
68
|
def _get_available_providers(self, registry: Registry) -> List[str]:
|
|
71
69
|
"""Get list of available providers."""
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Balance Sheet Statement Growth Standard Model."""
|
|
2
|
+
|
|
3
|
+
from datetime import date as dateType
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
from pydantic import Field, field_validator
|
|
7
|
+
|
|
8
|
+
from openbb_core.provider.abstract.data import Data
|
|
9
|
+
from openbb_core.provider.abstract.query_params import QueryParams
|
|
10
|
+
from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BalanceSheetGrowthQueryParams(QueryParams):
|
|
14
|
+
"""Balance Sheet Statement Growth Query."""
|
|
15
|
+
|
|
16
|
+
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
|
|
17
|
+
period: str = Field(
|
|
18
|
+
default="annual",
|
|
19
|
+
description=QUERY_DESCRIPTIONS.get("period", ""),
|
|
20
|
+
)
|
|
21
|
+
limit: Optional[int] = Field(
|
|
22
|
+
default=10, description=QUERY_DESCRIPTIONS.get("limit", "")
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
@field_validator("symbol", mode="before", check_fields=False)
|
|
26
|
+
@classmethod
|
|
27
|
+
def to_upper(cls, v: str):
|
|
28
|
+
"""Convert field to uppercase."""
|
|
29
|
+
return v.upper()
|
|
30
|
+
|
|
31
|
+
@field_validator("period", mode="before", check_fields=False)
|
|
32
|
+
@classmethod
|
|
33
|
+
def to_lower(cls, v: Optional[str]) -> Optional[str]:
|
|
34
|
+
"""Convert field to lowercase."""
|
|
35
|
+
return v.lower() if v else v
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class BalanceSheetGrowthData(Data):
|
|
39
|
+
"""Balance Sheet Statement Growth Data."""
|
|
40
|
+
|
|
41
|
+
period_ending: dateType = Field(description="The end date of the reporting period.")
|
|
42
|
+
fiscal_period: Optional[str] = Field(
|
|
43
|
+
description="The fiscal period of the report.", default=None
|
|
44
|
+
)
|
|
45
|
+
fiscal_year: Optional[int] = Field(
|
|
46
|
+
description="The fiscal year of the fiscal period.", default=None
|
|
47
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Cash Flow Statement Growth Standard Model."""
|
|
2
|
+
|
|
3
|
+
from datetime import date as dateType
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
from pydantic import Field, field_validator
|
|
7
|
+
|
|
8
|
+
from openbb_core.provider.abstract.data import Data
|
|
9
|
+
from openbb_core.provider.abstract.query_params import QueryParams
|
|
10
|
+
from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CashFlowStatementGrowthQueryParams(QueryParams):
|
|
14
|
+
"""Cash Flow Statement Growth Query."""
|
|
15
|
+
|
|
16
|
+
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
|
|
17
|
+
period: str = Field(
|
|
18
|
+
default="annual",
|
|
19
|
+
description=QUERY_DESCRIPTIONS.get("period", ""),
|
|
20
|
+
)
|
|
21
|
+
limit: Optional[int] = Field(
|
|
22
|
+
default=10, description=QUERY_DESCRIPTIONS.get("limit", "")
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
@field_validator("symbol", mode="before", check_fields=False)
|
|
26
|
+
@classmethod
|
|
27
|
+
def to_upper(cls, v: str) -> str:
|
|
28
|
+
"""Convert field to uppercase."""
|
|
29
|
+
return v.upper()
|
|
30
|
+
|
|
31
|
+
@field_validator("period", mode="before", check_fields=False)
|
|
32
|
+
@classmethod
|
|
33
|
+
def to_lower(cls, v: Optional[str]) -> Optional[str]:
|
|
34
|
+
"""Convert field to lowercase."""
|
|
35
|
+
return v.lower() if v else v
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class CashFlowStatementGrowthData(Data):
|
|
39
|
+
"""Cash Flow Statement Growth Data."""
|
|
40
|
+
|
|
41
|
+
period_ending: dateType = Field(description="The end date of the reporting period.")
|
|
42
|
+
fiscal_period: Optional[str] = Field(
|
|
43
|
+
description="The fiscal period of the report.", default=None
|
|
44
|
+
)
|
|
45
|
+
fiscal_year: Optional[int] = Field(
|
|
46
|
+
description="The fiscal year of the fiscal period.", default=None
|
|
47
|
+
)
|