fmp-data 2.5.0__tar.gz → 2.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. {fmp_data-2.5.0 → fmp_data-2.7.0}/.gitignore +15 -5
  2. fmp_data-2.5.0/README.md → fmp_data-2.7.0/PKG-INFO +158 -31
  3. fmp_data-2.5.0/PKG-INFO → fmp_data-2.7.0/README.md +87 -101
  4. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/__init__.py +22 -0
  5. fmp_data-2.7.0/fmp_data/_redaction.py +195 -0
  6. fmp_data-2.7.0/fmp_data/_version.py +24 -0
  7. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/async_client.py +95 -29
  8. fmp_data-2.7.0/fmp_data/alternative/client.py +220 -0
  9. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/endpoints.py +27 -73
  10. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/mapping.py +50 -50
  11. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/models.py +4 -3
  12. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/schema.py +15 -16
  13. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/base.py +413 -49
  14. fmp_data-2.7.0/fmp_data/batch/_csv_utils.py +182 -0
  15. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/async_client.py +110 -66
  16. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/client.py +106 -51
  17. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/endpoints.py +40 -65
  18. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/mapping.py +54 -24
  19. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/cache/__init__.py +7 -1
  20. fmp_data-2.7.0/fmp_data/cache/config.py +187 -0
  21. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/cache/file.py +2 -2
  22. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/cache/redis_backend.py +14 -3
  23. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/__init__.py +2 -0
  24. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/async_client.py +353 -138
  25. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/client.py +340 -134
  26. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/endpoints.py +145 -232
  27. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/hints.py +6 -22
  28. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/mapping.py +117 -3
  29. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/models.py +34 -11
  30. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/company/schema.py +19 -8
  31. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/config.py +168 -23
  32. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/async_client.py +27 -8
  33. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/client.py +28 -8
  34. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/endpoints.py +8 -33
  35. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/mapping.py +5 -22
  36. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/models.py +4 -3
  37. fmp_data-2.7.0/fmp_data/exceptions.py +174 -0
  38. fmp_data-2.7.0/fmp_data/fundamental/async_client.py +184 -0
  39. fmp_data-2.7.0/fmp_data/fundamental/client.py +168 -0
  40. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/fundamental/endpoints.py +26 -73
  41. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/fundamental/mapping.py +26 -78
  42. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/fundamental/models.py +112 -6
  43. fmp_data-2.7.0/fmp_data/helpers.py +229 -0
  44. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/async_client.py +21 -6
  45. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/client.py +18 -6
  46. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/endpoints.py +6 -6
  47. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/mapping.py +4 -1
  48. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/models.py +3 -1
  49. fmp_data-2.7.0/fmp_data/institutional/async_client.py +566 -0
  50. fmp_data-2.7.0/fmp_data/institutional/client.py +591 -0
  51. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/institutional/endpoints.py +56 -113
  52. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/institutional/mapping.py +47 -92
  53. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/institutional/models.py +40 -28
  54. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/institutional/schema.py +3 -2
  55. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/__init__.py +12 -0
  56. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/async_client.py +263 -54
  57. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/client.py +235 -50
  58. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/endpoints.py +292 -155
  59. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/mapping.py +327 -45
  60. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/models.py +232 -27
  61. fmp_data-2.7.0/fmp_data/investment/async_client.py +275 -0
  62. fmp_data-2.7.0/fmp_data/investment/client.py +259 -0
  63. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/investment/endpoints.py +57 -42
  64. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/investment/mapping.py +57 -48
  65. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/investment/models.py +6 -4
  66. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/investment/schema.py +19 -5
  67. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/__init__.py +54 -35
  68. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/config.py +16 -4
  69. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/embedding.py +41 -5
  70. fmp_data-2.7.0/fmp_data/lc/hints.py +515 -0
  71. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/models.py +25 -0
  72. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/registry.py +229 -50
  73. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/validation.py +2 -2
  74. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/vector_store.py +427 -69
  75. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/logger.py +229 -75
  76. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/async_client.py +173 -56
  77. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/client.py +149 -57
  78. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/endpoints.py +68 -124
  79. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/mapping.py +12 -1
  80. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/models.py +7 -5
  81. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/schema.py +26 -9
  82. fmp_data-2.7.0/fmp_data/mcp/cli.py +1315 -0
  83. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/mcp/discovery.py +10 -1
  84. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/mcp/server.py +3 -1
  85. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/mcp/setup.py +80 -75
  86. fmp_data-2.7.0/fmp_data/mcp/tool_loader.py +468 -0
  87. fmp_data-2.7.0/fmp_data/mcp/tools_manifest.py +304 -0
  88. fmp_data-2.7.0/fmp_data/mcp/utils.py +618 -0
  89. fmp_data-2.7.0/fmp_data/models.py +628 -0
  90. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/rate_limit.py +3 -2
  91. fmp_data-2.7.0/fmp_data/schema.py +319 -0
  92. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/async_client.py +87 -55
  93. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/client.py +84 -54
  94. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/endpoints.py +28 -55
  95. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/mapping.py +84 -12
  96. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/models.py +8 -6
  97. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/async_client.py +32 -26
  98. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/client.py +32 -26
  99. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/endpoints.py +11 -65
  100. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/mapping.py +15 -45
  101. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/schema.py +3 -4
  102. fmp_data-2.7.0/fmp_data/tool_binding.py +353 -0
  103. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/async_client.py +14 -5
  104. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/client.py +14 -4
  105. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/endpoints.py +4 -11
  106. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/mapping.py +18 -4
  107. {fmp_data-2.5.0 → fmp_data-2.7.0}/pyproject.toml +71 -36
  108. fmp_data-2.7.0/tests/e2e/harness.py +588 -0
  109. fmp_data-2.7.0/tests/e2e/test_client_sweep.py +55 -0
  110. fmp_data-2.7.0/tests/e2e/test_live_signatures.py +620 -0
  111. fmp_data-2.7.0/tests/integration/cassette_contracts.json +85 -0
  112. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/conftest.py +9 -1
  113. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_company.py +19 -0
  114. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_intelligence.py +123 -4
  115. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_lc.py +20 -15
  116. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/conftest.py +5 -0
  117. fmp_data-2.7.0/tests/unit/lc/__init__.py +0 -0
  118. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_config.py +15 -3
  119. fmp_data-2.7.0/tests/unit/lc/test_deprecated_endpoints.py +296 -0
  120. fmp_data-2.7.0/tests/unit/lc/test_embedding.py +207 -0
  121. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_endpoint_based_rules.py +0 -2
  122. fmp_data-2.7.0/tests/unit/lc/test_endpoint_method_coverage.py +310 -0
  123. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_mapping.py +23 -16
  124. fmp_data-2.7.0/tests/unit/lc/test_method_dispatch.py +725 -0
  125. fmp_data-2.7.0/tests/unit/lc/test_package_init.py +915 -0
  126. fmp_data-2.7.0/tests/unit/lc/test_tool_schema.py +302 -0
  127. fmp_data-2.7.0/tests/unit/lc/test_validation.py +631 -0
  128. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_validation_registry.py +155 -2
  129. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_vector_store.py +13 -6
  130. fmp_data-2.7.0/tests/unit/test_arg_model_deprecation.py +402 -0
  131. fmp_data-2.7.0/tests/unit/test_artifact_action_pins.py +46 -0
  132. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_async_clients.py +595 -71
  133. fmp_data-2.7.0/tests/unit/test_bandit_skips.py +59 -0
  134. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_base.py +975 -10
  135. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_base_async.py +99 -1
  136. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_base_coverage.py +11 -4
  137. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_batch.py +158 -11
  138. fmp_data-2.7.0/tests/unit/test_bulk_bytes.py +330 -0
  139. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_cache_backends.py +2 -2
  140. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_cache_integration.py +3 -3
  141. fmp_data-2.7.0/tests/unit/test_cache_ttl_override_keys.py +166 -0
  142. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_cassette_contracts.py +78 -1
  143. fmp_data-2.7.0/tests/unit/test_catalog_registration.py +517 -0
  144. fmp_data-2.7.0/tests/unit/test_checkout_credentials.py +82 -0
  145. fmp_data-2.7.0/tests/unit/test_ci_quality_gates.py +125 -0
  146. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_client.py +6 -6
  147. fmp_data-2.7.0/tests/unit/test_closed_vocabularies.py +546 -0
  148. fmp_data-2.7.0/tests/unit/test_codeql_workflow.py +50 -0
  149. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_company.py +395 -7
  150. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_company_coverage.py +158 -15
  151. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_config.py +34 -6
  152. fmp_data-2.7.0/tests/unit/test_config_secret_serialization.py +276 -0
  153. fmp_data-2.7.0/tests/unit/test_datetime_shadowing.py +121 -0
  154. fmp_data-2.7.0/tests/unit/test_dependabot_action_groups.py +17 -0
  155. fmp_data-2.7.0/tests/unit/test_deprecated_endpoint_flags.py +148 -0
  156. fmp_data-2.7.0/tests/unit/test_deprecated_methods_warn.py +287 -0
  157. fmp_data-2.7.0/tests/unit/test_docs_endpoints_sync.py +301 -0
  158. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_docs_tools_sync.py +24 -1
  159. fmp_data-2.7.0/tests/unit/test_e2e_harness.py +38 -0
  160. fmp_data-2.7.0/tests/unit/test_e2e_sweep.py +221 -0
  161. fmp_data-2.7.0/tests/unit/test_example_json_fences.py +33 -0
  162. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_exceptions.py +42 -0
  163. fmp_data-2.7.0/tests/unit/test_export_dotenv.py +110 -0
  164. fmp_data-2.7.0/tests/unit/test_extras_coverage_gate.py +178 -0
  165. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_fundamental.py +132 -6
  166. fmp_data-2.7.0/tests/unit/test_helpers.py +537 -0
  167. fmp_data-2.7.0/tests/unit/test_hint_consolidation.py +537 -0
  168. fmp_data-2.7.0/tests/unit/test_hosted_mcp_docs.py +65 -0
  169. fmp_data-2.7.0/tests/unit/test_imports.py +110 -0
  170. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_institutional.py +448 -0
  171. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_intelligence.py +504 -5
  172. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_investment.py +87 -16
  173. fmp_data-2.7.0/tests/unit/test_list_unwrap.py +555 -0
  174. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_logger.py +418 -13
  175. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_market.py +33 -12
  176. fmp_data-2.7.0/tests/unit/test_mcp.py +1731 -0
  177. fmp_data-2.7.0/tests/unit/test_mcp_cli.py +1258 -0
  178. fmp_data-2.7.0/tests/unit/test_mcp_config_perms.py +42 -0
  179. fmp_data-2.7.0/tests/unit/test_mcp_entry_point_coherence.py +774 -0
  180. fmp_data-2.7.0/tests/unit/test_mcp_setup.py +1195 -0
  181. fmp_data-2.7.0/tests/unit/test_mcp_utils.py +1540 -0
  182. fmp_data-2.7.0/tests/unit/test_models.py +648 -0
  183. fmp_data-2.7.0/tests/unit/test_param_required_consistency.py +440 -0
  184. fmp_data-2.7.0/tests/unit/test_path_params.py +46 -0
  185. fmp_data-2.7.0/tests/unit/test_publish_pins.py +60 -0
  186. fmp_data-2.7.0/tests/unit/test_redaction_rules.py +221 -0
  187. fmp_data-2.7.0/tests/unit/test_redis_backend.py +461 -0
  188. fmp_data-2.7.0/tests/unit/test_release_tag_push.py +123 -0
  189. fmp_data-2.7.0/tests/unit/test_secret_scan_ci.py +21 -0
  190. fmp_data-2.7.0/tests/unit/test_security_audit_pins.py +29 -0
  191. fmp_data-2.7.0/tests/unit/test_setup_uv_pin.py +37 -0
  192. fmp_data-2.7.0/tests/unit/test_tag_ancestry_guard.py +71 -0
  193. fmp_data-2.7.0/tests/unit/test_tool_binding.py +435 -0
  194. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_vcr_sanitization.py +17 -6
  195. fmp_data-2.7.0/tests/unit/test_vector_store_error_contract.py +191 -0
  196. fmp_data-2.7.0/tests/unit/test_workflow_permission_isolation.py +200 -0
  197. fmp_data-2.5.0/fmp_data/alternative/client.py +0 -158
  198. fmp_data-2.5.0/fmp_data/batch/_csv_utils.py +0 -121
  199. fmp_data-2.5.0/fmp_data/cache/config.py +0 -58
  200. fmp_data-2.5.0/fmp_data/exceptions.py +0 -97
  201. fmp_data-2.5.0/fmp_data/fundamental/async_client.py +0 -128
  202. fmp_data-2.5.0/fmp_data/fundamental/client.py +0 -112
  203. fmp_data-2.5.0/fmp_data/helpers.py +0 -92
  204. fmp_data-2.5.0/fmp_data/institutional/async_client.py +0 -361
  205. fmp_data-2.5.0/fmp_data/institutional/client.py +0 -352
  206. fmp_data-2.5.0/fmp_data/investment/async_client.py +0 -174
  207. fmp_data-2.5.0/fmp_data/investment/client.py +0 -157
  208. fmp_data-2.5.0/fmp_data/lc/hints.py +0 -134
  209. fmp_data-2.5.0/fmp_data/mcp/cli.py +0 -485
  210. fmp_data-2.5.0/fmp_data/mcp/tool_loader.py +0 -147
  211. fmp_data-2.5.0/fmp_data/mcp/tools_manifest.py +0 -214
  212. fmp_data-2.5.0/fmp_data/mcp/utils.py +0 -434
  213. fmp_data-2.5.0/fmp_data/models.py +0 -360
  214. fmp_data-2.5.0/fmp_data/schema.py +0 -165
  215. fmp_data-2.5.0/tests/unit/lc/test_embedding.py +0 -99
  216. fmp_data-2.5.0/tests/unit/test_catalog_registration.py +0 -243
  217. fmp_data-2.5.0/tests/unit/test_helpers.py +0 -141
  218. fmp_data-2.5.0/tests/unit/test_mcp.py +0 -780
  219. fmp_data-2.5.0/tests/unit/test_mcp_cli.py +0 -489
  220. fmp_data-2.5.0/tests/unit/test_models.py +0 -241
  221. {fmp_data-2.5.0 → fmp_data-2.7.0}/LICENSE +0 -0
  222. {fmp_data-2.5.0 → fmp_data-2.7.0}/NOTICE +0 -0
  223. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/alternative/__init__.py +0 -0
  224. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/async_client.py +0 -0
  225. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/__init__.py +0 -0
  226. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/batch/models.py +0 -0
  227. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/cache/base.py +0 -0
  228. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/cache/memory.py +0 -0
  229. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/client.py +0 -0
  230. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/__init__.py +0 -0
  231. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/economics/schema.py +0 -0
  232. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/fundamental/__init__.py +0 -0
  233. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/fundamental/schema.py +0 -0
  234. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/index/__init__.py +0 -0
  235. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/institutional/__init__.py +0 -0
  236. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/intelligence/schema.py +0 -0
  237. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/investment/__init__.py +0 -0
  238. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/mapping.py +0 -0
  239. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/lc/utils.py +0 -0
  240. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/__init__.py +0 -0
  241. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/market/hints.py +0 -0
  242. {fmp_data-2.5.0/tests/unit/lc → fmp_data-2.7.0/fmp_data/mcp}/__init__.py +0 -0
  243. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/mcp/__main__.py +0 -0
  244. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/mcp/_compat.py +0 -0
  245. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/py.typed +0 -0
  246. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/sec/__init__.py +0 -0
  247. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/__init__.py +0 -0
  248. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/technical/models.py +0 -0
  249. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/__init__.py +0 -0
  250. {fmp_data-2.5.0 → fmp_data-2.7.0}/fmp_data/transcripts/models.py +0 -0
  251. {fmp_data-2.5.0/tests/unit → fmp_data-2.7.0/tests}/__init__.py +0 -0
  252. {fmp_data-2.5.0/tests/integration → fmp_data-2.7.0/tests/e2e}/__init__.py +0 -0
  253. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/examples/__init__.py +0 -0
  254. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/examples/test_examples_smoke.py +0 -0
  255. {fmp_data-2.5.0/tests → fmp_data-2.7.0/tests/integration}/__init__.py +0 -0
  256. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/base.py +0 -0
  257. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_alternative.py +0 -0
  258. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_batch.py +0 -0
  259. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_economics.py +0 -0
  260. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_fundamental.py +0 -0
  261. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_index.py +0 -0
  262. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_institutional.py +0 -0
  263. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_investment.py +0 -0
  264. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_market.py +0 -0
  265. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_sec.py +0 -0
  266. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_technical.py +0 -0
  267. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/integration/test_transcripts.py +0 -0
  268. {fmp_data-2.5.0/fmp_data/mcp → fmp_data-2.7.0/tests/unit}/__init__.py +0 -0
  269. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/conftest.py +0 -0
  270. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_imports.py +0 -0
  271. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_models.py +0 -0
  272. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/lc/test_utils.py +0 -0
  273. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_alternative.py +0 -0
  274. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_alternative_coverage.py +0 -0
  275. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_economics.py +0 -0
  276. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_endpoint_registry.py +0 -0
  277. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_index.py +0 -0
  278. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_rate_limit.py +0 -0
  279. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_rate_limit_async.py +0 -0
  280. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_rate_limit_coverage.py +0 -0
  281. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_sec.py +0 -0
  282. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_technical.py +0 -0
  283. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_technical_coverage.py +0 -0
  284. {fmp_data-2.5.0 → fmp_data-2.7.0}/tests/unit/test_transcripts.py +0 -0
@@ -27,11 +27,16 @@ env/
27
27
  venv/
28
28
  ENV/
29
29
 
30
- # Lock files (trade-off: size vs reproducibility)
31
- # uv.lock (878KB) excluded to avoid GitHub's 500KB warning threshold
32
- # Trade-off: Accepts potential dependency drift for smaller repo size
33
- # CI regenerates from pyproject.toml - version constraints provide partial reproducibility
34
- # Users generate locally via: uv sync
30
+ # Lock files — deliberately not committed (#273).
31
+ # fmp-data ships as a library, so the compatibility contract is the version
32
+ # floors in pyproject.toml; installers resolve against those and never read a
33
+ # committed lock. Freezing one here would only pin CI, at the cost of a ~1MB
34
+ # blob and a multi-thousand-line diff on every dependency bump.
35
+ # Drift is caught rather than frozen: `nox -s security` exports the live
36
+ # extras graph and audits it with `pip-audit --strict`, and the Actions used
37
+ # by CI/publish are SHA-pinned (#252 FMP-SEC-002/008). See CONTRIBUTING.md
38
+ # "Lock file policy".
39
+ # Generate locally with: uv sync
35
40
  uv.lock
36
41
  poetry.lock
37
42
 
@@ -60,6 +65,8 @@ cover/
60
65
 
61
66
  # VCR cassettes (large recorded API responses, regenerated locally)
62
67
  tests/integration/vcr_cassettes/
68
+ tests/e2e/vcr_cassettes/
69
+ tests/e2e/reports/
63
70
 
64
71
  # Build
65
72
  *.manifest
@@ -83,3 +90,6 @@ reports/
83
90
 
84
91
  # Firecrawl example outputs
85
92
  examples/firecrawl_app/outputs/
93
+
94
+ # Generated at build time by hatch-vcs (see [tool.hatch.build.hooks.vcs])
95
+ fmp_data/_version.py
@@ -1,3 +1,74 @@
1
+ Metadata-Version: 2.5
2
+ Name: fmp-data
3
+ Version: 2.7.0
4
+ Summary: Python client for the Financial Modeling Prep API
5
+ Project-URL: Homepage, https://github.com/MehdiZare/fmp-data
6
+ Project-URL: Repository, https://github.com/MehdiZare/fmp-data
7
+ Project-URL: Documentation, https://mehdizare.github.io/fmp-data/
8
+ Author-email: Mehdi Zare <mehdizare@users.noreply.github.com>
9
+ Maintainer-email: Mehdi Zare <mehdizare@users.noreply.github.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: api,financial,financial data,fmp,market-data,stock market,stocks
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Framework :: AsyncIO
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Financial and Insurance Industry
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Topic :: Office/Business :: Financial
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Requires-Python: <3.15,>=3.10
30
+ Requires-Dist: httpx>=0.28.1
31
+ Requires-Dist: pydantic>=2.13.4
32
+ Requires-Dist: tenacity>=9.1.4
33
+ Provides-Extra: cache-redis
34
+ Requires-Dist: redis>=8.1.0; extra == 'cache-redis'
35
+ Provides-Extra: dev
36
+ Requires-Dist: bandit[toml]>=1.9.4; extra == 'dev'
37
+ Requires-Dist: coverage>=7.15.4; extra == 'dev'
38
+ Requires-Dist: freezegun>=1.5.5; extra == 'dev'
39
+ Requires-Dist: mypy>=2.3.0; extra == 'dev'
40
+ Requires-Dist: nox>=2026.7.11; extra == 'dev'
41
+ Requires-Dist: pip-audit>=2.10.1; extra == 'dev'
42
+ Requires-Dist: pre-commit>=4.6.1; extra == 'dev'
43
+ Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
44
+ Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
45
+ Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
46
+ Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
47
+ Requires-Dist: pytest>=9.1.1; extra == 'dev'
48
+ Requires-Dist: python-dotenv>=1.2.2; extra == 'dev'
49
+ Requires-Dist: responses>=0.26.2; extra == 'dev'
50
+ Requires-Dist: rich>=15.0.0; extra == 'dev'
51
+ Requires-Dist: ruff>=0.16.2; extra == 'dev'
52
+ Requires-Dist: twine>=7.0.0; extra == 'dev'
53
+ Requires-Dist: vcrpy>=8.3.0; extra == 'dev'
54
+ Provides-Extra: docs
55
+ Requires-Dist: mkdocs-material>=9.7.7; extra == 'docs'
56
+ Requires-Dist: mkdocs>=1.6.1; extra == 'docs'
57
+ Requires-Dist: mkdocstrings-python>=2.0.5; extra == 'docs'
58
+ Provides-Extra: langchain
59
+ Requires-Dist: faiss-cpu>=1.15.0; extra == 'langchain'
60
+ Requires-Dist: langchain-community>=0.4.2; extra == 'langchain'
61
+ Requires-Dist: langchain-core>=1.5.3; extra == 'langchain'
62
+ Requires-Dist: langchain-openai>=1.4.2; extra == 'langchain'
63
+ Requires-Dist: langgraph>=1.2.10; extra == 'langchain'
64
+ Requires-Dist: openai>=2.53.0; extra == 'langchain'
65
+ Requires-Dist: tiktoken>=0.13.0; extra == 'langchain'
66
+ Provides-Extra: mcp
67
+ Requires-Dist: mcp[cli]>=2.0.0; extra == 'mcp'
68
+ Requires-Dist: pyyaml>=6.0.3; extra == 'mcp'
69
+ Requires-Dist: tomli>=2.0.1; (python_version < '3.11') and extra == 'mcp'
70
+ Description-Content-Type: text/markdown
71
+
1
72
  # FMP Data Client
2
73
 
3
74
  [![Test-Matrix](https://github.com/MehdiZare/fmp-data/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/MehdiZare/fmp-data/actions/workflows/ci.yml)
@@ -32,7 +103,7 @@ This project uses UV as the primary package management tool for several key bene
32
103
  - Automatic retries with exponential backoff
33
104
  - 85%+ test coverage with comprehensive test suite
34
105
  - VCR cassette-backed integration tests with 100% endpoint contract validation
35
- - Automated API key leak scanning across all cassettes (pre-commit + CI)
106
+ - Automated secret scanning of the committed tree (pre-commit + CI)
36
107
  - Secure API key handling
37
108
  - 100% coverage of FMP stable endpoints
38
109
  - Detailed error messages
@@ -102,7 +173,7 @@ config = ClientConfig(
102
173
  cache=CacheConfig(
103
174
  backend="memory",
104
175
  default_ttl=300,
105
- ttl_overrides={"get_quote": 30},
176
+ ttl_overrides={"quote": 30},
106
177
  ),
107
178
  )
108
179
 
@@ -129,7 +200,15 @@ export FMP_CACHE_REDIS_URL=redis://localhost:6379/0
129
200
 
130
201
  ## MCP Server (Claude Desktop Integration)
131
202
 
132
- Model Context Protocol (MCP) server provides financial data access through a standardized protocol, enabling Claude Desktop to query FMP data seamlessly.
203
+ `fmp-mcp` is this package's **local** Model Context Protocol server. It exposes
204
+ our typed client as stdio tools for Claude Desktop and other MCP hosts.
205
+
206
+ FMP also ships a **hosted** MCP server at
207
+ `https://financialmodelingprep.com/mcp` (28 dataset-oriented tools, API key in
208
+ the URL). That is a different product. Use hosted MCP for a zero-install
209
+ agent connector; use `fmp-mcp` for the broader MCP tool catalog, manifests,
210
+ and typed local control. Comparison and coverage matrix:
211
+ [docs/mcp/hosted.md](docs/mcp/hosted.md).
133
212
 
134
213
  ### Quick Setup for Claude Desktop
135
214
 
@@ -176,14 +255,11 @@ Full tool list: [docs/mcp/tools.md](https://github.com/MehdiZare/fmp-data/blob/m
176
255
  export FMP_API_KEY=your_api_key_here
177
256
  export FMP_MCP_MANIFEST=/path/to/custom/manifest.py
178
257
 
179
- # Custom manifest example (manifest.py)
180
- TOOLS = [
181
- "company.profile",
182
- "market.search",
183
- "company.quote",
184
- "fundamental.income_statement",
185
- "fundamental.balance_sheet"
186
- ]
258
+ # Custom manifest example (manifest.json — preferred)
259
+ # { "tools": ["company.profile", "company.quote"] }
260
+ #
261
+ # Legacy Python is parsed as data, not executed:
262
+ # TOOLS = ["company.profile", "company.quote"]
187
263
  ```
188
264
 
189
265
  ### Integration with AI Assistants
@@ -223,13 +299,19 @@ For the full MCP catalog, run `fmp-mcp list` or see [docs/mcp/tools.md](https://
223
299
  ### Quick Start with Vector Store
224
300
 
225
301
  ```python
226
- from fmp_data import create_vector_store
302
+ from fmp_data import VectorStoreCreationError, create_vector_store
227
303
 
228
- # Initialize the vector store
229
- vector_store = create_vector_store(
230
- fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
231
- openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
232
- )
304
+ # Initialize the vector store. Raises VectorStoreCreationError if it cannot be
305
+ # built; the exception carries the underlying `cause` and a `failures` dict of
306
+ # any endpoints skipped during registration.
307
+ try:
308
+ vector_store = create_vector_store(
309
+ fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
310
+ openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
311
+ )
312
+ except VectorStoreCreationError as exc:
313
+ print(f"Could not build the vector store: {exc.cause}")
314
+ raise
233
315
 
234
316
  # Example queries
235
317
  queries = [
@@ -287,12 +369,14 @@ client = FMPDataClient(config=config)
287
369
 
288
370
  # Create vector store using the config
289
371
  vector_store = create_vector_store(
290
- fmp_api_key=config.api_key, # pragma: allowlist secret
291
- openai_api_key=config.embedding_api_key, # pragma: allowlist secret
372
+ # Credential fields are `SecretStr`, so `model_dump()` cannot leak them.
373
+ # Unwrap with `.get_secret_value()` wherever a plain string is required.
374
+ fmp_api_key=config.api_key.get_secret_value(), # pragma: allowlist secret
375
+ openai_api_key=config.embedding_api_key.get_secret_value(), # pragma: allowlist secret
292
376
  cache_dir=config.vector_store_path,
293
377
  embedding_provider=config.embedding_provider,
294
378
  embedding_model=config.embedding_model,
295
- )
379
+ ) # raises VectorStoreCreationError on failure -- see the example above
296
380
 
297
381
  # Search for relevant endpoints
298
382
  results = vector_store.search("show me Tesla's financial metrics")
@@ -321,6 +405,42 @@ export FMP_EMBEDDING_MODEL=text-embedding-3-small
321
405
  - Automatic caching of embeddings
322
406
  - Persistent vector store for faster lookups
323
407
 
408
+ ### Tool argument names (LangChain vs MCP)
409
+
410
+ LangChain tools built from the vector store keep **API / wire** parameter names
411
+ (`from`, `to`, `periodLength`, `sicCode`, …). When the method shape is
412
+ compatible, those names are mapped onto the matching client method
413
+ (`from_date` / `start_date`, …) at invoke so method defaults and constraints
414
+ still apply (#172 / #186). If a required method parameter had no wire source,
415
+ LangChain would keep the wire schema and fall back to `client.request` instead
416
+ of the method — as of #188 no tool in the catalog does, so every LangChain tool
417
+ dispatches through a client method.
418
+
419
+ MCP tools expose the **Python method** parameter names instead (the signature
420
+ of `client.<module>.<method>`). The same endpoint can therefore show
421
+ `from`/`to` in a LangChain schema and `from_date`/`to_date` (or
422
+ `start_date`/`end_date`) on MCP — both are intentional.
423
+
424
+ The institutional Form 13F and symbol-positions-summary tools used to be the
425
+ exception, because their client methods required a `report_date` the wire does
426
+ not have. They now dispatch through `get_form_13f_by_quarter` and
427
+ `get_institutional_holdings_by_quarter`, whose `year`/`quarter` arguments match
428
+ the API (which rejects a request without them). The date-shaped
429
+ `get_form_13f(cik, report_date)` and
430
+ `get_institutional_holdings(symbol, report_date)` are unchanged and remain the
431
+ convenient Python entry points.
432
+
433
+ Both integrations resolve and bind through one module, `fmp_data.tool_binding`
434
+ — attribute-chain resolution, the wire→method name aliases, the
435
+ required-parameter coverage gate, and the invoke-time kwargs mapping. It lives
436
+ in the core package (no LangChain or MCP import), so the rules cannot drift
437
+ apart between the two (#188).
438
+
439
+ A catalogue-wide guard (`tests/unit/lc/test_endpoint_method_coverage.py`) fails
440
+ CI on *new* uncovered required method parameters or newly dropped mandatory
441
+ wire fields under method dispatch. Known cases are allowlisted in that test
442
+ (#188).
443
+
324
444
  ## Quick Start
325
445
 
326
446
  ```python
@@ -415,13 +535,14 @@ with FMPDataClient.from_env() as client:
415
535
 
416
536
  ### 2. Financial Statements
417
537
  ```python
418
- from fmp_data import FMPDataClient
538
+ from fmp_data import FMPDataClient, Period
419
539
 
420
540
  with FMPDataClient.from_env() as client:
421
541
  # Get income statements
542
+ period: Period = "quarter"
422
543
  income_stmt = client.fundamental.get_income_statement(
423
544
  "AAPL",
424
- period="quarter", # or "annual"
545
+ period=period,
425
546
  limit=4,
426
547
  )
427
548
 
@@ -434,6 +555,8 @@ with FMPDataClient.from_env() as client:
434
555
 
435
556
  ### 3. Market Data
436
557
  ```python
558
+ from datetime import date
559
+
437
560
  from fmp_data import FMPDataClient
438
561
 
439
562
  with FMPDataClient.from_env() as client:
@@ -446,25 +569,27 @@ with FMPDataClient.from_env() as client:
446
569
  )
447
570
 
448
571
  # Get intraday prices
449
- intraday = client.company.get_intraday_prices("TSLA", interval="5min")
572
+ from fmp_data import Interval
573
+
574
+ interval: Interval = "5min"
575
+ intraday = client.company.get_intraday_prices("TSLA", interval=interval)
450
576
  ```
451
577
 
452
578
  ### 4. Technical Indicators
453
579
  ```python
454
- from fmp_data import FMPDataClient
455
- from datetime import date
580
+ from fmp_data import FMPDataClient, TechnicalInterval, Timeframe
456
581
 
457
582
  with FMPDataClient.from_env() as client:
458
583
  # Simple Moving Average
459
- sma = client.technical.get_sma("AAPL", period_length=20, timeframe="1day")
584
+ timeframe: Timeframe = "1day"
585
+ sma = client.technical.get_sma("AAPL", period_length=20, timeframe=timeframe)
586
+
587
+ # leftover interval aliases map onto Timeframe (daily→1day)
588
+ interval: TechnicalInterval = "daily"
589
+ sma_daily = client.technical.get_sma("AAPL", period_length=20, interval=interval)
460
590
 
461
591
  # RSI (Relative Strength Index)
462
592
  rsi = client.technical.get_rsi("AAPL", period_length=14, timeframe="1day")
463
-
464
- # MACD
465
- macd = client.technical.get_macd(
466
- "AAPL", fast_period=12, slow_period=26, signal_period=9
467
- )
468
593
  ```
469
594
 
470
595
  ### 5. Alternative Data
@@ -677,6 +802,8 @@ The library provides a comprehensive exception hierarchy for robust error handli
677
802
  from fmp_data import FMPDataClient
678
803
  from fmp_data.exceptions import (
679
804
  FMPError, # Base exception for all FMP errors
805
+ FMPTimeoutError, # HTTP request timed out
806
+ FMPNetworkError, # Transport / leftover RequestError
680
807
  RateLimitError, # API rate limit exceeded
681
808
  AuthenticationError, # Invalid or missing API key
682
809
  ValidationError, # Invalid request parameters
@@ -1,73 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: fmp-data
3
- Version: 2.5.0
4
- Summary: Python client for the Financial Modeling Prep API
5
- Project-URL: Homepage, https://github.com/MehdiZare/fmp-data
6
- Project-URL: Repository, https://github.com/MehdiZare/fmp-data
7
- Project-URL: Documentation, https://mehdizare.github.io/fmp-data/
8
- Author-email: Mehdi Zare <mehdizare@users.noreply.github.com>
9
- Maintainer-email: Mehdi Zare <mehdizare@users.noreply.github.com>
10
- License: MIT
11
- License-File: LICENSE
12
- License-File: NOTICE
13
- Keywords: api,financial,financial data,fmp,market-data,stock market,stocks
14
- Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: Framework :: AsyncIO
16
- Classifier: Intended Audience :: Developers
17
- Classifier: Intended Audience :: Financial and Insurance Industry
18
- Classifier: License :: OSI Approved :: MIT License
19
- Classifier: Operating System :: OS Independent
20
- Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.10
23
- Classifier: Programming Language :: Python :: 3.11
24
- Classifier: Programming Language :: Python :: 3.12
25
- Classifier: Programming Language :: Python :: 3.13
26
- Classifier: Programming Language :: Python :: 3.14
27
- Classifier: Topic :: Office/Business :: Financial
28
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
- Requires-Python: <3.15,>=3.10
30
- Requires-Dist: httpx>=0.28.1
31
- Requires-Dist: pydantic>=2.13.4
32
- Requires-Dist: tenacity>=9.1.4
33
- Provides-Extra: cache-redis
34
- Requires-Dist: redis>=8.0.1; extra == 'cache-redis'
35
- Provides-Extra: dev
36
- Requires-Dist: bandit[toml]>=1.9.4; extra == 'dev'
37
- Requires-Dist: coverage>=7.15.1; extra == 'dev'
38
- Requires-Dist: freezegun>=1.5.5; extra == 'dev'
39
- Requires-Dist: mypy>=2.2.0; extra == 'dev'
40
- Requires-Dist: nox>=2026.7.11; extra == 'dev'
41
- Requires-Dist: pip-audit>=2.10.1; extra == 'dev'
42
- Requires-Dist: pre-commit>=4.6.0; extra == 'dev'
43
- Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
44
- Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
45
- Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
46
- Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
47
- Requires-Dist: pytest>=9.1.1; extra == 'dev'
48
- Requires-Dist: python-dotenv>=1.2.2; extra == 'dev'
49
- Requires-Dist: responses>=0.26.2; extra == 'dev'
50
- Requires-Dist: rich>=15.0.0; extra == 'dev'
51
- Requires-Dist: ruff>=0.15.21; extra == 'dev'
52
- Requires-Dist: twine>=6.2.0; extra == 'dev'
53
- Requires-Dist: vcrpy>=8.3.0; extra == 'dev'
54
- Provides-Extra: docs
55
- Requires-Dist: mkdocs-material>=9.7.6; extra == 'docs'
56
- Requires-Dist: mkdocs>=1.6.1; extra == 'docs'
57
- Requires-Dist: mkdocstrings-python>=2.0.5; extra == 'docs'
58
- Provides-Extra: langchain
59
- Requires-Dist: faiss-cpu>=1.14.3; extra == 'langchain'
60
- Requires-Dist: langchain-community>=0.4.2; extra == 'langchain'
61
- Requires-Dist: langchain-core>=1.4.9; extra == 'langchain'
62
- Requires-Dist: langchain-openai>=1.3.5; extra == 'langchain'
63
- Requires-Dist: langgraph>=1.2.9; extra == 'langchain'
64
- Requires-Dist: openai>=2.45.0; extra == 'langchain'
65
- Requires-Dist: tiktoken>=0.13.0; extra == 'langchain'
66
- Provides-Extra: mcp
67
- Requires-Dist: mcp[cli]>=1.28.1; extra == 'mcp'
68
- Requires-Dist: pyyaml>=6.0.3; extra == 'mcp'
69
- Description-Content-Type: text/markdown
70
-
71
1
  # FMP Data Client
72
2
 
73
3
  [![Test-Matrix](https://github.com/MehdiZare/fmp-data/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/MehdiZare/fmp-data/actions/workflows/ci.yml)
@@ -102,7 +32,7 @@ This project uses UV as the primary package management tool for several key bene
102
32
  - Automatic retries with exponential backoff
103
33
  - 85%+ test coverage with comprehensive test suite
104
34
  - VCR cassette-backed integration tests with 100% endpoint contract validation
105
- - Automated API key leak scanning across all cassettes (pre-commit + CI)
35
+ - Automated secret scanning of the committed tree (pre-commit + CI)
106
36
  - Secure API key handling
107
37
  - 100% coverage of FMP stable endpoints
108
38
  - Detailed error messages
@@ -172,7 +102,7 @@ config = ClientConfig(
172
102
  cache=CacheConfig(
173
103
  backend="memory",
174
104
  default_ttl=300,
175
- ttl_overrides={"get_quote": 30},
105
+ ttl_overrides={"quote": 30},
176
106
  ),
177
107
  )
178
108
 
@@ -199,7 +129,15 @@ export FMP_CACHE_REDIS_URL=redis://localhost:6379/0
199
129
 
200
130
  ## MCP Server (Claude Desktop Integration)
201
131
 
202
- Model Context Protocol (MCP) server provides financial data access through a standardized protocol, enabling Claude Desktop to query FMP data seamlessly.
132
+ `fmp-mcp` is this package's **local** Model Context Protocol server. It exposes
133
+ our typed client as stdio tools for Claude Desktop and other MCP hosts.
134
+
135
+ FMP also ships a **hosted** MCP server at
136
+ `https://financialmodelingprep.com/mcp` (28 dataset-oriented tools, API key in
137
+ the URL). That is a different product. Use hosted MCP for a zero-install
138
+ agent connector; use `fmp-mcp` for the broader MCP tool catalog, manifests,
139
+ and typed local control. Comparison and coverage matrix:
140
+ [docs/mcp/hosted.md](docs/mcp/hosted.md).
203
141
 
204
142
  ### Quick Setup for Claude Desktop
205
143
 
@@ -246,14 +184,11 @@ Full tool list: [docs/mcp/tools.md](https://github.com/MehdiZare/fmp-data/blob/m
246
184
  export FMP_API_KEY=your_api_key_here
247
185
  export FMP_MCP_MANIFEST=/path/to/custom/manifest.py
248
186
 
249
- # Custom manifest example (manifest.py)
250
- TOOLS = [
251
- "company.profile",
252
- "market.search",
253
- "company.quote",
254
- "fundamental.income_statement",
255
- "fundamental.balance_sheet"
256
- ]
187
+ # Custom manifest example (manifest.json — preferred)
188
+ # { "tools": ["company.profile", "company.quote"] }
189
+ #
190
+ # Legacy Python is parsed as data, not executed:
191
+ # TOOLS = ["company.profile", "company.quote"]
257
192
  ```
258
193
 
259
194
  ### Integration with AI Assistants
@@ -293,13 +228,19 @@ For the full MCP catalog, run `fmp-mcp list` or see [docs/mcp/tools.md](https://
293
228
  ### Quick Start with Vector Store
294
229
 
295
230
  ```python
296
- from fmp_data import create_vector_store
231
+ from fmp_data import VectorStoreCreationError, create_vector_store
297
232
 
298
- # Initialize the vector store
299
- vector_store = create_vector_store(
300
- fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
301
- openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
302
- )
233
+ # Initialize the vector store. Raises VectorStoreCreationError if it cannot be
234
+ # built; the exception carries the underlying `cause` and a `failures` dict of
235
+ # any endpoints skipped during registration.
236
+ try:
237
+ vector_store = create_vector_store(
238
+ fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
239
+ openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
240
+ )
241
+ except VectorStoreCreationError as exc:
242
+ print(f"Could not build the vector store: {exc.cause}")
243
+ raise
303
244
 
304
245
  # Example queries
305
246
  queries = [
@@ -357,12 +298,14 @@ client = FMPDataClient(config=config)
357
298
 
358
299
  # Create vector store using the config
359
300
  vector_store = create_vector_store(
360
- fmp_api_key=config.api_key, # pragma: allowlist secret
361
- openai_api_key=config.embedding_api_key, # pragma: allowlist secret
301
+ # Credential fields are `SecretStr`, so `model_dump()` cannot leak them.
302
+ # Unwrap with `.get_secret_value()` wherever a plain string is required.
303
+ fmp_api_key=config.api_key.get_secret_value(), # pragma: allowlist secret
304
+ openai_api_key=config.embedding_api_key.get_secret_value(), # pragma: allowlist secret
362
305
  cache_dir=config.vector_store_path,
363
306
  embedding_provider=config.embedding_provider,
364
307
  embedding_model=config.embedding_model,
365
- )
308
+ ) # raises VectorStoreCreationError on failure -- see the example above
366
309
 
367
310
  # Search for relevant endpoints
368
311
  results = vector_store.search("show me Tesla's financial metrics")
@@ -391,6 +334,42 @@ export FMP_EMBEDDING_MODEL=text-embedding-3-small
391
334
  - Automatic caching of embeddings
392
335
  - Persistent vector store for faster lookups
393
336
 
337
+ ### Tool argument names (LangChain vs MCP)
338
+
339
+ LangChain tools built from the vector store keep **API / wire** parameter names
340
+ (`from`, `to`, `periodLength`, `sicCode`, …). When the method shape is
341
+ compatible, those names are mapped onto the matching client method
342
+ (`from_date` / `start_date`, …) at invoke so method defaults and constraints
343
+ still apply (#172 / #186). If a required method parameter had no wire source,
344
+ LangChain would keep the wire schema and fall back to `client.request` instead
345
+ of the method — as of #188 no tool in the catalog does, so every LangChain tool
346
+ dispatches through a client method.
347
+
348
+ MCP tools expose the **Python method** parameter names instead (the signature
349
+ of `client.<module>.<method>`). The same endpoint can therefore show
350
+ `from`/`to` in a LangChain schema and `from_date`/`to_date` (or
351
+ `start_date`/`end_date`) on MCP — both are intentional.
352
+
353
+ The institutional Form 13F and symbol-positions-summary tools used to be the
354
+ exception, because their client methods required a `report_date` the wire does
355
+ not have. They now dispatch through `get_form_13f_by_quarter` and
356
+ `get_institutional_holdings_by_quarter`, whose `year`/`quarter` arguments match
357
+ the API (which rejects a request without them). The date-shaped
358
+ `get_form_13f(cik, report_date)` and
359
+ `get_institutional_holdings(symbol, report_date)` are unchanged and remain the
360
+ convenient Python entry points.
361
+
362
+ Both integrations resolve and bind through one module, `fmp_data.tool_binding`
363
+ — attribute-chain resolution, the wire→method name aliases, the
364
+ required-parameter coverage gate, and the invoke-time kwargs mapping. It lives
365
+ in the core package (no LangChain or MCP import), so the rules cannot drift
366
+ apart between the two (#188).
367
+
368
+ A catalogue-wide guard (`tests/unit/lc/test_endpoint_method_coverage.py`) fails
369
+ CI on *new* uncovered required method parameters or newly dropped mandatory
370
+ wire fields under method dispatch. Known cases are allowlisted in that test
371
+ (#188).
372
+
394
373
  ## Quick Start
395
374
 
396
375
  ```python
@@ -485,13 +464,14 @@ with FMPDataClient.from_env() as client:
485
464
 
486
465
  ### 2. Financial Statements
487
466
  ```python
488
- from fmp_data import FMPDataClient
467
+ from fmp_data import FMPDataClient, Period
489
468
 
490
469
  with FMPDataClient.from_env() as client:
491
470
  # Get income statements
471
+ period: Period = "quarter"
492
472
  income_stmt = client.fundamental.get_income_statement(
493
473
  "AAPL",
494
- period="quarter", # or "annual"
474
+ period=period,
495
475
  limit=4,
496
476
  )
497
477
 
@@ -504,6 +484,8 @@ with FMPDataClient.from_env() as client:
504
484
 
505
485
  ### 3. Market Data
506
486
  ```python
487
+ from datetime import date
488
+
507
489
  from fmp_data import FMPDataClient
508
490
 
509
491
  with FMPDataClient.from_env() as client:
@@ -516,25 +498,27 @@ with FMPDataClient.from_env() as client:
516
498
  )
517
499
 
518
500
  # Get intraday prices
519
- intraday = client.company.get_intraday_prices("TSLA", interval="5min")
501
+ from fmp_data import Interval
502
+
503
+ interval: Interval = "5min"
504
+ intraday = client.company.get_intraday_prices("TSLA", interval=interval)
520
505
  ```
521
506
 
522
507
  ### 4. Technical Indicators
523
508
  ```python
524
- from fmp_data import FMPDataClient
525
- from datetime import date
509
+ from fmp_data import FMPDataClient, TechnicalInterval, Timeframe
526
510
 
527
511
  with FMPDataClient.from_env() as client:
528
512
  # Simple Moving Average
529
- sma = client.technical.get_sma("AAPL", period_length=20, timeframe="1day")
513
+ timeframe: Timeframe = "1day"
514
+ sma = client.technical.get_sma("AAPL", period_length=20, timeframe=timeframe)
515
+
516
+ # leftover interval aliases map onto Timeframe (daily→1day)
517
+ interval: TechnicalInterval = "daily"
518
+ sma_daily = client.technical.get_sma("AAPL", period_length=20, interval=interval)
530
519
 
531
520
  # RSI (Relative Strength Index)
532
521
  rsi = client.technical.get_rsi("AAPL", period_length=14, timeframe="1day")
533
-
534
- # MACD
535
- macd = client.technical.get_macd(
536
- "AAPL", fast_period=12, slow_period=26, signal_period=9
537
- )
538
522
  ```
539
523
 
540
524
  ### 5. Alternative Data
@@ -747,6 +731,8 @@ The library provides a comprehensive exception hierarchy for robust error handli
747
731
  from fmp_data import FMPDataClient
748
732
  from fmp_data.exceptions import (
749
733
  FMPError, # Base exception for all FMP errors
734
+ FMPTimeoutError, # HTTP request timed out
735
+ FMPNetworkError, # Transport / leftover RequestError
750
736
  RateLimitError, # API rate limit exceeded
751
737
  AuthenticationError, # Invalid or missing API key
752
738
  ValidationError, # Invalid request parameters
@@ -31,10 +31,22 @@ from fmp_data.exceptions import (
31
31
  AuthenticationError,
32
32
  ConfigError,
33
33
  FMPError,
34
+ FMPNetworkError,
35
+ FMPTimeoutError,
34
36
  RateLimitError,
35
37
  ValidationError,
38
+ VectorStoreCreationError,
36
39
  )
37
40
  from fmp_data.logger import FMPLogger
41
+ from fmp_data.schema import (
42
+ Interval,
43
+ Period,
44
+ PeriodAnnualQuarter,
45
+ PeriodFiscal,
46
+ Structure,
47
+ TechnicalInterval,
48
+ Timeframe,
49
+ )
38
50
 
39
51
  # Version handling - generated by hatch-vcs
40
52
  try:
@@ -55,11 +67,21 @@ __all__ = [
55
67
  "FMPDataClient",
56
68
  "FMPError",
57
69
  "FMPLogger",
70
+ "FMPNetworkError",
71
+ "FMPTimeoutError",
72
+ "Interval",
58
73
  "LogHandlerConfig",
59
74
  "LoggingConfig",
75
+ "Period",
76
+ "PeriodAnnualQuarter",
77
+ "PeriodFiscal",
60
78
  "RateLimitConfig",
61
79
  "RateLimitError",
80
+ "Structure",
81
+ "TechnicalInterval",
82
+ "Timeframe",
62
83
  "ValidationError",
84
+ "VectorStoreCreationError",
63
85
  "__version__",
64
86
  "is_langchain_available",
65
87
  "logger",