kensho-kfinance 3.2.13__py3-none-any.whl → 3.2.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kensho-kfinance
3
- Version: 3.2.13
3
+ Version: 3.2.15
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,11 +1,11 @@
1
- kensho_kfinance-3.2.13.dist-info/licenses/AUTHORS.md,sha256=0h9ClbI0pu1oKj1M28ROUsaxrbZg-6ukQGl6X4y9noI,68
2
- kensho_kfinance-3.2.13.dist-info/licenses/LICENSE,sha256=bsY4blvSgq6o0FMQ3RXa2NCgco--nHCCchLXzxr6kms,83
3
- kfinance/CHANGELOG.md,sha256=z81MP-CD4T8Alp1QRMxNfIrdKki4ljwQpLQlQc4a_mM,3611
1
+ kensho_kfinance-3.2.15.dist-info/licenses/AUTHORS.md,sha256=0h9ClbI0pu1oKj1M28ROUsaxrbZg-6ukQGl6X4y9noI,68
2
+ kensho_kfinance-3.2.15.dist-info/licenses/LICENSE,sha256=bsY4blvSgq6o0FMQ3RXa2NCgco--nHCCchLXzxr6kms,83
3
+ kfinance/CHANGELOG.md,sha256=xJT27qCAAKJQM0y85678HYdKdwqM06p9Oc3U84T5pik,3796
4
4
  kfinance/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
5
  kfinance/conftest.py,sha256=PFflyOx08XgmEA0rdugud7QEA7KqARmd22SH2dLTqrE,4091
6
6
  kfinance/mcp.py,sha256=LTzCIlqsDKRD-0Xcpa_P99-JmJ8duAneO_-GzM43kjw,424
7
7
  kfinance/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- kfinance/version.py,sha256=J3pqLgy74OE8Fl2xQdOtnkegZoLi97vlblTAesq5P9s,706
8
+ kfinance/version.py,sha256=CRv3L1Q_i86zRaBBd6DJtqrNBMlFDH42gmrAKivd6gU,706
9
9
  kfinance/client/README.md,sha256=DA5vg4uz1JmJNiqvYywrj46YNhOr584WO8L83Ysx_Mk,372
10
10
  kfinance/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  kfinance/client/batch_request_handling.py,sha256=0r9x3-vXdpyKhfsIa6VZ9hovN60t3HB7nE3v5hnrSyI,6617
@@ -35,7 +35,7 @@ kfinance/domains/business_relationships/business_relationship_tools.py,sha256=xK
35
35
  kfinance/domains/business_relationships/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  kfinance/domains/business_relationships/tests/test_business_relationship_tools.py,sha256=e_EGtM4i5Qw5J1Wi2kXahkyjDA4mhHcT0DFAKA5JQdI,2459
37
37
  kfinance/domains/capitalizations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- kfinance/domains/capitalizations/capitalization_models.py,sha256=wKs9th3yoG84n3lC_9hF9QVeMQXKmmpFA-GaFTsCITY,3447
38
+ kfinance/domains/capitalizations/capitalization_models.py,sha256=uXHtu_4lpKUJiYA-s2UbmjImCzpNKmfrMgi3zlbBDsU,3507
39
39
  kfinance/domains/capitalizations/capitalization_tools.py,sha256=3pG174VA-uLrbtk6xlER-xXZfz5PCePT_dE7dTCeNu0,5146
40
40
  kfinance/domains/capitalizations/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  kfinance/domains/capitalizations/tests/test_capitalization_models.py,sha256=SSFxEVnSLvuNjOK-gx4I3OCHso80OA37zOLmiHJhsro,3143
@@ -48,7 +48,7 @@ kfinance/domains/companies/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
48
48
  kfinance/domains/companies/tests/test_company_tools.py,sha256=ijZF6tWswvtD9YpjtGAPsS76nyOf6aaNPB_u_v-EAwQ,5587
49
49
  kfinance/domains/competitors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  kfinance/domains/competitors/competitor_models.py,sha256=HAEn2AzKZNusclsFzyAufpS-627RfRGL4Vw1AiT_Ek0,747
51
- kfinance/domains/competitors/competitor_tools.py,sha256=k1zyr03gbnIrQ8IaENaZlVE8RiiW_77MqnArWzKa02M,2524
51
+ kfinance/domains/competitors/competitor_tools.py,sha256=ZjKZfr33Wh3lbstsQdFOHsbs9fLZ_flDWNALtFB6UxI,2590
52
52
  kfinance/domains/competitors/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  kfinance/domains/competitors/tests/test_competitor_tools.py,sha256=o7y4huxc5DUTNBm5HO-QArr-X9wEcXtsX5umuQ3owz4,2552
54
54
  kfinance/domains/cusip_and_isin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -61,10 +61,10 @@ kfinance/domains/earnings/earning_tools.py,sha256=AmHZQKTGExPPxyDdjhrn5CVLvWr6xM
61
61
  kfinance/domains/earnings/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  kfinance/domains/earnings/tests/test_earnings_tools.py,sha256=qGhdWI1s4uEjF6XtFC0f1nlAths1H6xfym-iJyBpwBo,6998
63
63
  kfinance/domains/line_items/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- kfinance/domains/line_items/line_item_models.py,sha256=bjSfXy0dxpUXr5MGU4FchSR2kz8J5TwyPHcW-TCDxb4,45537
65
- kfinance/domains/line_items/line_item_tools.py,sha256=bP1lbWVGg32XG6i8uhg8xtc9ttlRpoSDDI5NPxm6g90,5347
64
+ kfinance/domains/line_items/line_item_models.py,sha256=orSPa5tiIN73f70aRbvkLglUk0ZbvqyaEPQJWp2OOfA,65241
65
+ kfinance/domains/line_items/line_item_tools.py,sha256=ZfWQxdWAaIOtquh_SGuuoRkvp9f1LsFlt-In1F9NSTw,8643
66
66
  kfinance/domains/line_items/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
- kfinance/domains/line_items/tests/test_line_item_tools.py,sha256=vgxJsPbQG1msXZKTfpyHSzUfhw0GvfxZ041T7J-56hU,5499
67
+ kfinance/domains/line_items/tests/test_line_item_tools.py,sha256=_72HW41KIvbZs_25_pN6r0oUHrvbOi2Q6IIk8evJ8VE,11573
68
68
  kfinance/domains/mergers_and_acquisitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
69
  kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_models.py,sha256=WAWyBCgYMZj8NLz6nq_sW5MRg_UU5_F9jUUoQ_bcmsM,1893
70
70
  kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_tools.py,sha256=Yx3_TxTWdPcIiOddyAJEddpWc6L-fgx1-JoMtqdPtWQ,7156
@@ -108,7 +108,7 @@ kfinance/integrations/tool_calling/static_tools/tests/test_get_n_quarters_ago.py
108
108
  kfinance/integrations/tool_calling/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  kfinance/integrations/tool_calling/tests/test_tool_calling_models.py,sha256=5L8TpSVJmrjNzGcnERorpfeyrgLND_DL46ld5hVlcNw,2933
110
110
  kfinance/models/permission_models.py,sha256=G0so8ZOsD1YDsCM4he0z5R9M_shUbSRwD3hUDJdqZl0,635
111
- kensho_kfinance-3.2.13.dist-info/METADATA,sha256=R6Z87HGlxlKkOoC16rP8MOVxp_G8GJ5ncFK5DWBfdQA,6198
112
- kensho_kfinance-3.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
113
- kensho_kfinance-3.2.13.dist-info/top_level.txt,sha256=kT_kNwVhfQoOAecY8W7uYah5xaHMoHoAdBIvXh6DaKM,9
114
- kensho_kfinance-3.2.13.dist-info/RECORD,,
111
+ kensho_kfinance-3.2.15.dist-info/METADATA,sha256=mc-pn41xZA1Ow3P03Zl1URUUuRthvuxXcMWyG6QiczQ,6198
112
+ kensho_kfinance-3.2.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
113
+ kensho_kfinance-3.2.15.dist-info/top_level.txt,sha256=kT_kNwVhfQoOAecY8W7uYah5xaHMoHoAdBIvXh6DaKM,9
114
+ kensho_kfinance-3.2.15.dist-info/RECORD,,
kfinance/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Changelog
2
+
3
+ ## v3.2.15
4
+ - Add smart line item validation with intelligent suggestions and descriptions to reduce token consumption by 75%
5
+
6
+ # 3.2.14
7
+ - Fix Capitalizations validator to handle nulls
8
+
2
9
  # 3.2.13
3
10
  - Fix Prices validator to handle null OHLC price data
4
11
 
@@ -66,7 +66,8 @@ class Capitalizations(BaseModel):
66
66
  currency = data["currency"]
67
67
  for capitalization in data["market_caps"]:
68
68
  for key in ["market_cap", "tev"]:
69
- capitalization[key] = dict(unit=currency, value=capitalization[key])
69
+ if capitalization[key] is not None:
70
+ capitalization[key] = dict(unit=currency, value=capitalization[key])
70
71
  return data
71
72
 
72
73
  def model_dump_json_single_metric(
@@ -1,3 +1,5 @@
1
+ from typing import Type
2
+
1
3
  from kfinance.client.batch_request_handling import Task, process_tasks_in_thread_pool_executor
2
4
  from kfinance.client.permission_models import Permission
3
5
  from kfinance.domains.competitors.competitor_models import CompetitorResponse, CompetitorSource
@@ -20,7 +22,7 @@ class GetCompetitorsFromIdentifiersResp(ToolRespWithErrors):
20
22
  class GetCompetitorsFromIdentifiers(KfinanceTool):
21
23
  name: str = "get_competitors_from_identifiers"
22
24
  description: str = "Retrieves a list of company_id and company_name that are competitors for a list of companies, optionally filtered by the source of the competitor information."
23
- args_schema = GetCompetitorsFromIdentifiersArgs
25
+ args_schema: Type[GetCompetitorsFromIdentifiersArgs] = GetCompetitorsFromIdentifiersArgs
24
26
  accepted_permissions: set[Permission] | None = {Permission.CompetitorsPermission}
25
27
 
26
28
  def _run(