kensho-kfinance 3.2.11__tar.gz → 3.2.13__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.

Potentially problematic release.


This version of kensho-kfinance might be problematic. Click here for more details.

Files changed (148) hide show
  1. {kensho_kfinance-3.2.11/kensho_kfinance.egg-info → kensho_kfinance-3.2.13}/PKG-INFO +1 -1
  2. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13/kensho_kfinance.egg-info}/PKG-INFO +1 -1
  3. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/CHANGELOG.md +6 -0
  4. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/capitalization_models.py +2 -11
  5. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/line_items/line_item_models.py +0 -121
  6. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/line_items/line_item_tools.py +0 -6
  7. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/price_models.py +7 -6
  8. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/version.py +3 -3
  9. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.coveragerc +0 -0
  10. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.github/workflows/ci-lint.yml +0 -0
  11. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.github/workflows/ci-test.yml +0 -0
  12. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.github/workflows/python-publish.yml +0 -0
  13. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.gitignore +0 -0
  14. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/.readthedocs.yaml +0 -0
  15. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/AUTHORS.md +0 -0
  16. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/CODE_OF_CONDUCT.md +0 -0
  17. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/CONTRIBUTING.md +0 -0
  18. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/LICENSE +0 -0
  19. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/README.md +0 -0
  20. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/build_tool_calling_documentation.py +0 -0
  21. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/conf.py +0 -0
  22. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/index.rst +0 -0
  23. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/kfinance.rst +0 -0
  24. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/requirements.txt +0 -0
  25. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/templates/apidoc/package.rst_t +0 -0
  26. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/templates/apidoc/toc.rst_t +0 -0
  27. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/docs/tool_calling.rst +0 -0
  28. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/basic_usage.ipynb +0 -0
  29. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/langchain/anthropic_langchain_tool_calling.ipynb +0 -0
  30. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/langchain/google_gemini_langchain_tool_calling.ipynb +0 -0
  31. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/langchain/openai_langchain_tool_calling.ipynb +0 -0
  32. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/non-langchain/anthropic_tool_calling.ipynb +0 -0
  33. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/non-langchain/google_gemini_tool_calling.ipynb +0 -0
  34. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/example_notebooks/tool_calling/non-langchain/openai_langchain_tool_calling.ipynb +0 -0
  35. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/images/colab_logo_32px.png +0 -0
  36. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/justfile +0 -0
  37. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kensho_kfinance.egg-info/SOURCES.txt +0 -0
  38. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kensho_kfinance.egg-info/dependency_links.txt +0 -0
  39. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kensho_kfinance.egg-info/requires.txt +0 -0
  40. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kensho_kfinance.egg-info/top_level.txt +0 -0
  41. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/__init__.py +0 -0
  42. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/README.md +0 -0
  43. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/__init__.py +0 -0
  44. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/batch_request_handling.py +0 -0
  45. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/fetch.py +0 -0
  46. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/industry_models.py +0 -0
  47. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/kfinance.py +0 -0
  48. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/meta_classes.py +0 -0
  49. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/__init__.py +0 -0
  50. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/currency_models.py +0 -0
  51. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/date_and_period_models.py +0 -0
  52. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/decimal_with_unit.py +0 -0
  53. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/tests/__init__.py +0 -0
  54. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/models/tests/test_decimal_with_unit.py +0 -0
  55. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/permission_models.py +0 -0
  56. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/server_thread.py +0 -0
  57. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/__init__.py +0 -0
  58. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/test_batch_requests.py +0 -0
  59. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/test_client.py +0 -0
  60. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/test_fetch.py +0 -0
  61. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/test_group_objects.py +0 -0
  62. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/client/tests/test_objects.py +0 -0
  63. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/conftest.py +0 -0
  64. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/README.md +0 -0
  65. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/__init__.py +0 -0
  66. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/business_relationships/__init__.py +0 -0
  67. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/business_relationships/business_relationship_models.py +0 -0
  68. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/business_relationships/business_relationship_tools.py +0 -0
  69. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/business_relationships/tests/__init__.py +0 -0
  70. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/business_relationships/tests/test_business_relationship_tools.py +0 -0
  71. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/__init__.py +0 -0
  72. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/capitalization_tools.py +0 -0
  73. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/tests/__init__.py +0 -0
  74. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/tests/test_capitalization_models.py +0 -0
  75. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/capitalizations/tests/test_capitalization_tools.py +0 -0
  76. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/__init__.py +0 -0
  77. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/company_identifiers.py +0 -0
  78. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/company_models.py +0 -0
  79. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/company_tools.py +0 -0
  80. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/tests/__init__.py +0 -0
  81. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/companies/tests/test_company_tools.py +0 -0
  82. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/competitors/__init__.py +0 -0
  83. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/competitors/competitor_models.py +0 -0
  84. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/competitors/competitor_tools.py +0 -0
  85. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/competitors/tests/__init__.py +0 -0
  86. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/competitors/tests/test_competitor_tools.py +0 -0
  87. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/cusip_and_isin/__init__.py +0 -0
  88. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/cusip_and_isin/cusip_and_isin_tools.py +0 -0
  89. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/cusip_and_isin/tests/__init__.py +0 -0
  90. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/cusip_and_isin/tests/test_cusip_and_isin_tools.py +0 -0
  91. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/earnings/__init__.py +0 -0
  92. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/earnings/earning_models.py +0 -0
  93. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/earnings/earning_tools.py +0 -0
  94. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/earnings/tests/__init__.py +0 -0
  95. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/earnings/tests/test_earnings_tools.py +0 -0
  96. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/line_items/__init__.py +0 -0
  97. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/line_items/tests/__init__.py +0 -0
  98. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/line_items/tests/test_line_item_tools.py +0 -0
  99. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/mergers_and_acquisitions/__init__.py +0 -0
  100. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_models.py +0 -0
  101. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_tools.py +0 -0
  102. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/mergers_and_acquisitions/tests/__init__.py +0 -0
  103. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/mergers_and_acquisitions/tests/test_merger_and_acquisition_tools.py +0 -0
  104. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/__init__.py +0 -0
  105. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/price_tools.py +0 -0
  106. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/tests/__init__.py +0 -0
  107. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/tests/test_price_models.py +0 -0
  108. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/prices/tests/test_price_tools.py +0 -0
  109. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/segments/__init__.py +0 -0
  110. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/segments/segment_models.py +0 -0
  111. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/segments/segment_tools.py +0 -0
  112. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/segments/tests/__init__.py +0 -0
  113. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/segments/tests/test_segment_tools.py +0 -0
  114. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/statements/__init__.py +0 -0
  115. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/statements/statement_models.py +0 -0
  116. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/statements/statement_tools.py +0 -0
  117. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/statements/tests/__init__.py +0 -0
  118. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/domains/statements/tests/test_statement_tools.py +0 -0
  119. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/README.md +0 -0
  120. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/__init__.py +0 -0
  121. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/local_mcp/__init__.py +0 -0
  122. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/local_mcp/kfinance_mcp.py +0 -0
  123. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/local_mcp/local_mcp.py +0 -0
  124. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tests/__init__.py +0 -0
  125. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tests/test_example_notebook.py +0 -0
  126. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/README.md +0 -0
  127. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/__init__.py +0 -0
  128. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/all_tools.py +0 -0
  129. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/prompts.py +0 -0
  130. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/README.md +0 -0
  131. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/__init__.py +0 -0
  132. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/get_latest.py +0 -0
  133. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/get_n_quarters_ago.py +0 -0
  134. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/tests/__init__.py +0 -0
  135. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/tests/test_get_lastest.py +0 -0
  136. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/static_tools/tests/test_get_n_quarters_ago.py +0 -0
  137. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/tests/__init__.py +0 -0
  138. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/tests/test_tool_calling_models.py +0 -0
  139. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/integrations/tool_calling/tool_calling_models.py +0 -0
  140. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/mcp.py +0 -0
  141. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/models/permission_models.py +0 -0
  142. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/kfinance/py.typed +0 -0
  143. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/pyproject.toml +0 -0
  144. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/scripts/copyright_line_check.sh +0 -0
  145. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/scripts/lint.sh +0 -0
  146. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/scripts/test.sh +0 -0
  147. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/setup.cfg +0 -0
  148. {kensho_kfinance-3.2.11 → kensho_kfinance-3.2.13}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kensho-kfinance
3
- Version: 3.2.11
3
+ Version: 3.2.13
4
4
  Summary: Python CLI for kFinance
5
5
  Author-email: Luke Brown <luke.brown@kensho.com>, Michelle Keoy <michelle.keoy@kensho.com>, Keith Page <keith.page@kensho.com>, Matthew Rosen <matthew.rosen@kensho.com>, Nick Roshdieh <nick.roshdieh@kensho.com>
6
6
  Project-URL: source, https://github.com/kensho-technologies/kfinance
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kensho-kfinance
3
- Version: 3.2.11
3
+ Version: 3.2.13
4
4
  Summary: Python CLI for kFinance
5
5
  Author-email: Luke Brown <luke.brown@kensho.com>, Michelle Keoy <michelle.keoy@kensho.com>, Keith Page <keith.page@kensho.com>, Matthew Rosen <matthew.rosen@kensho.com>, Nick Roshdieh <nick.roshdieh@kensho.com>
6
6
  Project-URL: source, https://github.com/kensho-technologies/kfinance
@@ -1,4 +1,10 @@
1
1
  # Changelog
2
+ # 3.2.13
3
+ - Fix Prices validator to handle null OHLC price data
4
+
5
+ # 3.2.12
6
+ - Remove multiples line item support
7
+
2
8
  # 3.2.11
3
9
  - Add Handling of status code 400 for Capitalizations, Modify EV/TEV ratio to target quarterly or LTM
4
10
 
@@ -2,7 +2,7 @@ from copy import deepcopy
2
2
  from datetime import date
3
3
  from typing import Any
4
4
 
5
- from pydantic import BaseModel, Field, model_validator
5
+ from pydantic import BaseModel, ConfigDict, Field, model_validator
6
6
  from strenum import StrEnum
7
7
 
8
8
  from kfinance.client.models.decimal_with_unit import Money, Shares
@@ -28,18 +28,9 @@ class DailyCapitalization(BaseModel):
28
28
  class Capitalizations(BaseModel):
29
29
  """Capitalizations represents market cap, TEV, and shares outstanding for a date range"""
30
30
 
31
+ model_config = ConfigDict(validate_by_name=True)
31
32
  capitalizations: list[DailyCapitalization] = Field(validation_alias="market_caps")
32
33
 
33
- @model_validator(mode="before")
34
- @classmethod
35
- def handle_field_alias(cls, data: Any) -> Any:
36
- """Handle both 'capitalizations' and 'market_caps' field names"""
37
- if isinstance(data, dict):
38
- if "capitalizations" in data and "market_caps" not in data:
39
- data = deepcopy(data)
40
- data["market_caps"] = data["capitalizations"]
41
- return data
42
-
43
34
  @model_validator(mode="before")
44
35
  @classmethod
45
36
  def inject_currency_into_data(cls, data: Any) -> Any:
@@ -1599,127 +1599,6 @@ LINE_ITEMS: list[LineItemType] = [
1599
1599
  "dataitemid": 4034,
1600
1600
  "spgi_name": "Total Debt/Equity",
1601
1601
  },
1602
- {
1603
- "name": "last_close_tev_to_ebit",
1604
- "aliases": {
1605
- "ev_to_ebit",
1606
- "enterprise_value_to_ebit",
1607
- "enterprise_value_to_earnings_before_interest_and_taxes",
1608
- "tev_to_ebit",
1609
- "total_ev_to_ebit",
1610
- "total_enterprise_value_to_ebit",
1611
- "total_enterprise_value_to_earnings_before_interest_and_taxes",
1612
- "last_tev_to_ebit",
1613
- "last_total_ev_to_ebit",
1614
- "last_enterprise_value_to_ebit",
1615
- "last_enterprise_value_to_earnings_before_interest_and_taxes",
1616
- "last_total_enterprise_value_to_ebit",
1617
- "last_total_enterprise_value_to_earnings_before_interest_and_taxes",
1618
- "last_close_ev_to_ebit",
1619
- "last_close_enterprise_value_to_ebit",
1620
- "last_close_total_ev_to_ebit",
1621
- "last_close_enterprise_value_to_ebit",
1622
- "last_close_enterprise_value_to_earnings_before_interest_and_taxes",
1623
- "last_close_total_enterprise_value_to_ebit",
1624
- "last_close_total_enterprise_value_to_earnings_before_interest_and_taxes",
1625
- },
1626
- "dataitemid": 100062,
1627
- "spgi_name": "Last Close TEV / EBIT",
1628
- },
1629
- {
1630
- "name": "last_close_tev_to_ebitda",
1631
- "aliases": {
1632
- "ev_to_ebitda",
1633
- "enterprise_value_to_ebitda",
1634
- "enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1635
- "tev_to_ebitda",
1636
- "total_ev_to_ebitda",
1637
- "total_enterprise_value_to_ebitda",
1638
- "total_enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1639
- "last_tev_to_ebitda",
1640
- "last_total_ev_to_ebitda",
1641
- "last_enterprise_value_to_ebitda",
1642
- "last_enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1643
- "last_total_enterprise_value_to_ebitda",
1644
- "last_total_enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1645
- "last_close_total_ev_to_ebitda",
1646
- "last_close_enterprise_value_to_ebitda",
1647
- "last_close_enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1648
- "last_close_total_enterprise_value_to_ebitda",
1649
- "last_close_total_enterprise_value_to_earnings_before_interest_taxes_depreciation_and_amortization",
1650
- },
1651
- "dataitemid": 100063,
1652
- "spgi_name": "Last Close TEV / EBITDA",
1653
- },
1654
- {
1655
- "name": "ev_to_employees",
1656
- "aliases": {
1657
- "ev_to_employee_count",
1658
- "ev_to_headcount",
1659
- "enterprise_value_to_employees",
1660
- "enterprise_value_to_employee_count",
1661
- "enterprise_value_to_headcount",
1662
- "tev_to_employees",
1663
- "tev_to_employee_count",
1664
- "tev_to_headcount",
1665
- "total_ev_to_employees",
1666
- "total_ev_to_employee_count",
1667
- "total_ev_to_headcount",
1668
- "total_enterprise_value_to_employees",
1669
- "total_enterprise_value_to_employee_count",
1670
- "total_enterprise_value_to_headcount",
1671
- "last_ev_to_employees",
1672
- "last_ev_to_employee_count",
1673
- "last_ev_to_headcount",
1674
- "last_tev_to_employees",
1675
- "last_tev_to_employee_count",
1676
- "last_tev_to_headcount",
1677
- "last_total_ev_to_employees",
1678
- "last_total_ev_to_employee_count",
1679
- "last_total_ev_to_headcount",
1680
- "last_enterprise_value_to_employees",
1681
- "last_enterprise_value_to_employee_count",
1682
- "last_enterprise_value_to_headcount",
1683
- "last_total_enterprise_value_to_employees",
1684
- "last_total_enterprise_value_to_employee_count",
1685
- "last_total_enterprise_value_to_headcount",
1686
- "last_close_ev_to_employees",
1687
- "last_close_ev_to_employee_count",
1688
- "last_close_ev_to_headcount",
1689
- "last_close_tev_to_employees",
1690
- "last_close_tev_to_employee_count",
1691
- "last_close_tev_to_headcount",
1692
- "last_close_total_ev_to_employees",
1693
- "last_close_total_ev_to_employee_count",
1694
- "last_close_total_ev_to_headcount",
1695
- "last_close_enterprise_value_to_employees",
1696
- "last_close_enterprise_value_to_employee_count",
1697
- "last_close_enterprise_value_to_headcount",
1698
- "last_close_total_enterprise_value_to_employees",
1699
- "last_close_total_enterprise_value_to_employee_count",
1700
- "last_close_total_enterprise_value_to_headcount",
1701
- },
1702
- "dataitemid": 100070,
1703
- "spgi_name": "Last Close TEV / Employees",
1704
- },
1705
- {
1706
- "name": "ev_to_total_revenue",
1707
- "aliases": {
1708
- "tev_to_total_revenue",
1709
- "enterprise_value_to_total_revenue",
1710
- "total_enterprise_value_to_total_revenue",
1711
- "last_ev_to_total_revenue",
1712
- "last_tev_to_total_revenue",
1713
- "last_enterprise_value_to_total_revenue",
1714
- "last_enterprise_value_to_total_revenue",
1715
- "last_close_ev_to_total_revenue",
1716
- "last_close_tev_to_total_revenue",
1717
- "last_close_enterprise_value_to_total_revenue",
1718
- "last_close_enterprise_value_to_total_revenue",
1719
- },
1720
- "dataitemid": 100061,
1721
- "spgi_name": "Last Close TEV / Total Revenue",
1722
- },
1723
1602
  ]
1724
1603
  LINE_ITEM_NAMES_AND_ALIASES: list[str] = list(
1725
1604
  chain(*[[line_item["name"]] + list(line_item["aliases"]) for line_item in LINE_ITEMS])
@@ -45,12 +45,6 @@ class GetFinancialLineItemFromIdentifiers(KfinanceTool):
45
45
  - To fetch the most recent value for the line item, leave start_year, start_quarter, end_year, and end_quarter as None.
46
46
  - The tool accepts arguments in calendar years, and all outputs will be presented in terms of calendar years. Please note that these calendar years may not align with the company's fiscal year.
47
47
  - All aliases for a line item return identical data (e.g., "revenue", "normal_revenue", and "regular_revenue" all return the same financial data).
48
- - For the following Enterprise Value (EV) ratio line items, always specify period_type as either "quarterly" or "ltm" (Last Twelve Months) - do not rely on the default annual period:
49
- - last_close_tev_to_ebit (and its aliases: ev_to_ebit, enterprise_value_to_ebit, tev_to_ebit, etc.)
50
- - last_close_tev_to_ebitda (and its aliases: ev_to_ebitda, enterprise_value_to_ebitda, tev_to_ebitda, etc.)
51
- - ev_to_employees (and its aliases: ev_to_employee_count, tev_to_employees, enterprise_value_to_employees, etc.)
52
- - ev_to_total_revenue (and its aliases: tev_to_total_revenue, enterprise_value_to_total_revenue, etc.)
53
- - When requesting these EV ratios, explicitly set period_type="quarterly" or period_type="ltm" for optimal data availability.
54
48
 
55
49
  Example:
56
50
  Query: "What are the revenues of Lowe's and Home Depot?"
@@ -15,11 +15,11 @@ class Prices(BaseModel):
15
15
  """
16
16
 
17
17
  date: str
18
- open: Money
19
- high: Money
20
- low: Money
21
- close: Money
22
- volume: Shares
18
+ open: Money | None
19
+ high: Money | None
20
+ low: Money | None
21
+ close: Money | None # For Consistency with other OHLC dtype
22
+ volume: Shares | None
23
23
 
24
24
 
25
25
  class PriceHistory(BaseModel):
@@ -58,7 +58,8 @@ class PriceHistory(BaseModel):
58
58
  currency = data["currency"]
59
59
  for capitalization in data["prices"]:
60
60
  for key in ["open", "high", "low", "close"]:
61
- capitalization[key] = dict(unit=currency, value=capitalization[key])
61
+ if capitalization[key] is not None:
62
+ capitalization[key] = dict(unit=currency, value=capitalization[key])
62
63
  return data
63
64
 
64
65
 
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '3.2.11'
32
- __version_tuple__ = version_tuple = (3, 2, 11)
31
+ __version__ = version = '3.2.13'
32
+ __version_tuple__ = version_tuple = (3, 2, 13)
33
33
 
34
- __commit_id__ = commit_id = 'gadcf2fd95'
34
+ __commit_id__ = commit_id = 'g54fc4c63f'