fmp-data 2.3.1__tar.gz → 2.5.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.
- {fmp_data-2.3.1 → fmp_data-2.5.0}/PKG-INFO +66 -79
- {fmp_data-2.3.1 → fmp_data-2.5.0}/README.md +42 -55
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/base.py +109 -11
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/hints.py +9 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/mapping.py +37 -15
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/models.py +26 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/mapping.py +1 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/helpers.py +12 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/mapping.py +14 -38
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/models.py +1 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/async_client.py +77 -14
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/client.py +77 -14
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/endpoints.py +33 -3
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/mapping.py +438 -105
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/models.py +48 -2
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/__init__.py +101 -25
- fmp_data-2.5.0/fmp_data/lc/hints.py +134 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/registry.py +63 -32
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/mapping.py +23 -12
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/__main__.py +3 -3
- fmp_data-2.5.0/fmp_data/mcp/_compat.py +49 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/server.py +8 -12
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/setup.py +3 -4
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/tool_loader.py +3 -5
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/tools_manifest.py +16 -7
- {fmp_data-2.3.1 → fmp_data-2.5.0}/pyproject.toml +63 -47
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/examples/test_examples_smoke.py +9 -7
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/conftest.py +1 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_economics.py +12 -12
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_intelligence.py +74 -49
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_investment.py +8 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_lc.py +6 -4
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_market.py +9 -9
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_mapping.py +9 -2
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_models.py +2 -2
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_validation_registry.py +70 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_vector_store.py +17 -7
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_alternative.py +6 -6
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_async_clients.py +135 -13
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_base.py +366 -3
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_base_async.py +12 -5
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_base_coverage.py +1 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_batch.py +47 -0
- fmp_data-2.5.0/tests/unit/test_catalog_registration.py +243 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_client.py +6 -3
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_company.py +55 -2
- fmp_data-2.5.0/tests/unit/test_docs_tools_sync.py +149 -0
- fmp_data-2.5.0/tests/unit/test_endpoint_registry.py +131 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_exceptions.py +1 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_fundamental.py +1 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_helpers.py +24 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_intelligence.py +168 -48
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_logger.py +5 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_mcp.py +354 -5
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_models.py +3 -1
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_vcr_sanitization.py +3 -4
- fmp_data-2.3.1/fmp_data/lc/hints.py +0 -66
- {fmp_data-2.3.1 → fmp_data-2.5.0}/.gitignore +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/LICENSE +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/NOTICE +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/alternative/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/_csv_utils.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/batch/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/base.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/config.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/file.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/memory.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/cache/redis_backend.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/company/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/config.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/economics/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/exceptions.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/fundamental/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/index/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/institutional/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/intelligence/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/investment/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/config.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/embedding.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/utils.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/validation.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/lc/vector_store.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/logger.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/hints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/market/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/cli.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/discovery.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/mcp/utils.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/py.typed +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/rate_limit.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/sec/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/technical/schema.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/async_client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/client.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/endpoints.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/mapping.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/fmp_data/transcripts/models.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/examples/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/base.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_alternative.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_batch.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_company.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_fundamental.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_index.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_institutional.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_sec.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_technical.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/integration/test_transcripts.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/conftest.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/__init__.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/conftest.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_config.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_embedding.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_endpoint_based_rules.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_imports.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/lc/test_utils.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_alternative_coverage.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_cache_backends.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_cache_integration.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_cassette_contracts.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_company_coverage.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_config.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_economics.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_index.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_institutional.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_investment.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_market.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_mcp_cli.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_rate_limit.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_rate_limit_async.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_rate_limit_coverage.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_sec.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_technical.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_technical_coverage.py +0 -0
- {fmp_data-2.3.1 → fmp_data-2.5.0}/tests/unit/test_transcripts.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmp-data
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: Python client for the Financial Modeling Prep API
|
|
5
5
|
Project-URL: Homepage, https://github.com/MehdiZare/fmp-data
|
|
6
6
|
Project-URL: Repository, https://github.com/MehdiZare/fmp-data
|
|
@@ -28,43 +28,43 @@ Classifier: Topic :: Office/Business :: Financial
|
|
|
28
28
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
29
|
Requires-Python: <3.15,>=3.10
|
|
30
30
|
Requires-Dist: httpx>=0.28.1
|
|
31
|
-
Requires-Dist: pydantic>=2.
|
|
31
|
+
Requires-Dist: pydantic>=2.13.4
|
|
32
32
|
Requires-Dist: tenacity>=9.1.4
|
|
33
33
|
Provides-Extra: cache-redis
|
|
34
|
-
Requires-Dist: redis>=
|
|
34
|
+
Requires-Dist: redis>=8.0.1; extra == 'cache-redis'
|
|
35
35
|
Provides-Extra: dev
|
|
36
36
|
Requires-Dist: bandit[toml]>=1.9.4; extra == 'dev'
|
|
37
|
-
Requires-Dist: coverage>=7.
|
|
37
|
+
Requires-Dist: coverage>=7.15.1; extra == 'dev'
|
|
38
38
|
Requires-Dist: freezegun>=1.5.5; extra == 'dev'
|
|
39
|
-
Requires-Dist: mypy>=
|
|
40
|
-
Requires-Dist: nox>=2026.
|
|
41
|
-
Requires-Dist: pip-audit>=2.10.
|
|
42
|
-
Requires-Dist: pre-commit>=4.
|
|
43
|
-
Requires-Dist: pytest-asyncio>=1.
|
|
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
44
|
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
|
|
45
45
|
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
|
|
46
|
-
Requires-Dist: pytest-xdist>=3.
|
|
47
|
-
Requires-Dist: pytest>=9.
|
|
46
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
48
48
|
Requires-Dist: python-dotenv>=1.2.2; extra == 'dev'
|
|
49
|
-
Requires-Dist: responses>=0.26.
|
|
50
|
-
Requires-Dist: rich>=
|
|
51
|
-
Requires-Dist: ruff>=0.15.
|
|
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
52
|
Requires-Dist: twine>=6.2.0; extra == 'dev'
|
|
53
|
-
Requires-Dist: vcrpy>=8.
|
|
53
|
+
Requires-Dist: vcrpy>=8.3.0; extra == 'dev'
|
|
54
54
|
Provides-Extra: docs
|
|
55
55
|
Requires-Dist: mkdocs-material>=9.7.6; extra == 'docs'
|
|
56
56
|
Requires-Dist: mkdocs>=1.6.1; extra == 'docs'
|
|
57
|
-
Requires-Dist: mkdocstrings-python>=2.0.
|
|
57
|
+
Requires-Dist: mkdocstrings-python>=2.0.5; extra == 'docs'
|
|
58
58
|
Provides-Extra: langchain
|
|
59
|
-
Requires-Dist: faiss-cpu>=1.
|
|
60
|
-
Requires-Dist: langchain-community>=0.4.
|
|
61
|
-
Requires-Dist: langchain-core>=1.
|
|
62
|
-
Requires-Dist: langchain-openai>=1.
|
|
63
|
-
Requires-Dist: langgraph>=1.
|
|
64
|
-
Requires-Dist: openai>=2.
|
|
65
|
-
Requires-Dist: tiktoken>=0.
|
|
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
66
|
Provides-Extra: mcp
|
|
67
|
-
Requires-Dist: mcp[cli]>=1.
|
|
67
|
+
Requires-Dist: mcp[cli]>=1.28.1; extra == 'mcp'
|
|
68
68
|
Requires-Dist: pyyaml>=6.0.3; extra == 'mcp'
|
|
69
69
|
Description-Content-Type: text/markdown
|
|
70
70
|
|
|
@@ -297,15 +297,15 @@ from fmp_data import create_vector_store
|
|
|
297
297
|
|
|
298
298
|
# Initialize the vector store
|
|
299
299
|
vector_store = create_vector_store(
|
|
300
|
-
fmp_api_key="YOUR_FMP_API_KEY",
|
|
301
|
-
openai_api_key="YOUR_OPENAI_API_KEY" # pragma: allowlist secret
|
|
300
|
+
fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
|
|
301
|
+
openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
|
|
302
302
|
)
|
|
303
303
|
|
|
304
304
|
# Example queries
|
|
305
305
|
queries = [
|
|
306
306
|
"what is the price of Apple stock?",
|
|
307
307
|
"what was the revenue of Tesla last year?",
|
|
308
|
-
"what's new in the market?"
|
|
308
|
+
"what's new in the market?",
|
|
309
309
|
]
|
|
310
310
|
|
|
311
311
|
# Search for relevant endpoints and tools
|
|
@@ -319,7 +319,7 @@ for query in queries:
|
|
|
319
319
|
for tool in tools:
|
|
320
320
|
print(f"Name: {tool.get('name')}")
|
|
321
321
|
print(f"Description: {tool.get('description')}")
|
|
322
|
-
print("Parameters:", tool.get(
|
|
322
|
+
print("Parameters:", tool.get("parameters"))
|
|
323
323
|
print()
|
|
324
324
|
|
|
325
325
|
# You can also search endpoints directly
|
|
@@ -346,10 +346,10 @@ from fmp_data.lc.embedding import EmbeddingProvider
|
|
|
346
346
|
|
|
347
347
|
# Configure with LangChain support
|
|
348
348
|
config = LangChainConfig(
|
|
349
|
-
api_key="YOUR_FMP_API_KEY",
|
|
349
|
+
api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
|
|
350
350
|
embedding_provider=EmbeddingProvider.OPENAI,
|
|
351
|
-
embedding_api_key="YOUR_OPENAI_API_KEY",
|
|
352
|
-
embedding_model="text-embedding-3-small"
|
|
351
|
+
embedding_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
|
|
352
|
+
embedding_model="text-embedding-3-small",
|
|
353
353
|
)
|
|
354
354
|
|
|
355
355
|
# Create client with LangChain config
|
|
@@ -398,23 +398,23 @@ from fmp_data import FMPDataClient, ClientConfig, LoggingConfig
|
|
|
398
398
|
from fmp_data.exceptions import FMPError, RateLimitError, AuthenticationError
|
|
399
399
|
|
|
400
400
|
# Method 1: Initialize with direct API key
|
|
401
|
-
client = FMPDataClient(api_key="your_api_key_here")
|
|
401
|
+
client = FMPDataClient(api_key="your_api_key_here") # pragma: allowlist secret
|
|
402
402
|
|
|
403
403
|
# Method 2: Initialize from environment variable (FMP_API_KEY)
|
|
404
404
|
client = FMPDataClient.from_env()
|
|
405
405
|
|
|
406
406
|
# Method 3: Initialize with custom configuration
|
|
407
407
|
config = ClientConfig(
|
|
408
|
-
api_key="your_api_key_here",
|
|
408
|
+
api_key="your_api_key_here", # pragma: allowlist secret
|
|
409
409
|
timeout=30,
|
|
410
410
|
max_retries=3,
|
|
411
411
|
base_url="https://financialmodelingprep.com",
|
|
412
|
-
logging=LoggingConfig(level="INFO")
|
|
412
|
+
logging=LoggingConfig(level="INFO"),
|
|
413
413
|
)
|
|
414
414
|
client = FMPDataClient(config=config)
|
|
415
415
|
|
|
416
416
|
# Using with context manager (recommended)
|
|
417
|
-
with FMPDataClient(api_key="your_api_key_here") as client:
|
|
417
|
+
with FMPDataClient(api_key="your_api_key_here") as client: # pragma: allowlist secret
|
|
418
418
|
try:
|
|
419
419
|
# Get company profile
|
|
420
420
|
profile = client.company.get_profile("AAPL")
|
|
@@ -492,14 +492,11 @@ with FMPDataClient.from_env() as client:
|
|
|
492
492
|
income_stmt = client.fundamental.get_income_statement(
|
|
493
493
|
"AAPL",
|
|
494
494
|
period="quarter", # or "annual"
|
|
495
|
-
limit=4
|
|
495
|
+
limit=4,
|
|
496
496
|
)
|
|
497
497
|
|
|
498
498
|
# Get balance sheets
|
|
499
|
-
balance_sheet = client.fundamental.get_balance_sheet(
|
|
500
|
-
"AAPL",
|
|
501
|
-
period="annual"
|
|
502
|
-
)
|
|
499
|
+
balance_sheet = client.fundamental.get_balance_sheet("AAPL", period="annual")
|
|
503
500
|
|
|
504
501
|
# Get cash flow statements
|
|
505
502
|
cash_flow = client.fundamental.get_cash_flow("AAPL")
|
|
@@ -515,16 +512,11 @@ with FMPDataClient.from_env() as client:
|
|
|
515
512
|
|
|
516
513
|
# Get historical prices
|
|
517
514
|
history = client.company.get_historical_prices(
|
|
518
|
-
symbol="TSLA",
|
|
519
|
-
from_date=date(2023, 1, 1),
|
|
520
|
-
to_date=date(2023, 12, 31)
|
|
515
|
+
symbol="TSLA", from_date=date(2023, 1, 1), to_date=date(2023, 12, 31)
|
|
521
516
|
)
|
|
522
517
|
|
|
523
518
|
# Get intraday prices
|
|
524
|
-
intraday = client.company.get_intraday_prices(
|
|
525
|
-
"TSLA",
|
|
526
|
-
interval="5min"
|
|
527
|
-
)
|
|
519
|
+
intraday = client.company.get_intraday_prices("TSLA", interval="5min")
|
|
528
520
|
```
|
|
529
521
|
|
|
530
522
|
### 4. Technical Indicators
|
|
@@ -534,25 +526,14 @@ from datetime import date
|
|
|
534
526
|
|
|
535
527
|
with FMPDataClient.from_env() as client:
|
|
536
528
|
# Simple Moving Average
|
|
537
|
-
sma = client.technical.get_sma(
|
|
538
|
-
"AAPL",
|
|
539
|
-
period_length=20,
|
|
540
|
-
timeframe="1day"
|
|
541
|
-
)
|
|
529
|
+
sma = client.technical.get_sma("AAPL", period_length=20, timeframe="1day")
|
|
542
530
|
|
|
543
531
|
# RSI (Relative Strength Index)
|
|
544
|
-
rsi = client.technical.get_rsi(
|
|
545
|
-
"AAPL",
|
|
546
|
-
period_length=14,
|
|
547
|
-
timeframe="1day"
|
|
548
|
-
)
|
|
532
|
+
rsi = client.technical.get_rsi("AAPL", period_length=14, timeframe="1day")
|
|
549
533
|
|
|
550
534
|
# MACD
|
|
551
535
|
macd = client.technical.get_macd(
|
|
552
|
-
"AAPL",
|
|
553
|
-
fast_period=12,
|
|
554
|
-
slow_period=26,
|
|
555
|
-
signal_period=9
|
|
536
|
+
"AAPL", fast_period=12, slow_period=26, signal_period=9
|
|
556
537
|
)
|
|
557
538
|
```
|
|
558
539
|
|
|
@@ -668,6 +649,7 @@ API reference in `docs/api/reference.md#async-client-usage`.
|
|
|
668
649
|
from fmp_data import AsyncFMPDataClient
|
|
669
650
|
import asyncio
|
|
670
651
|
|
|
652
|
+
|
|
671
653
|
async def main():
|
|
672
654
|
async with AsyncFMPDataClient.from_env() as client:
|
|
673
655
|
# All endpoint methods are async
|
|
@@ -683,6 +665,7 @@ async def main():
|
|
|
683
665
|
for p in profiles:
|
|
684
666
|
print(f"{p.symbol}: {p.company_name}")
|
|
685
667
|
|
|
668
|
+
|
|
686
669
|
asyncio.run(main())
|
|
687
670
|
```
|
|
688
671
|
|
|
@@ -715,7 +698,13 @@ FMP_MCP_MANIFEST=/path/to/custom/manifest.py
|
|
|
715
698
|
|
|
716
699
|
### Custom Configuration
|
|
717
700
|
```python
|
|
718
|
-
from fmp_data import
|
|
701
|
+
from fmp_data import (
|
|
702
|
+
FMPDataClient,
|
|
703
|
+
ClientConfig,
|
|
704
|
+
LoggingConfig,
|
|
705
|
+
RateLimitConfig,
|
|
706
|
+
LogHandlerConfig,
|
|
707
|
+
)
|
|
719
708
|
|
|
720
709
|
config = ClientConfig(
|
|
721
710
|
api_key="your_api_key_here", # pragma: allowlist secret
|
|
@@ -723,9 +712,7 @@ config = ClientConfig(
|
|
|
723
712
|
max_retries=3,
|
|
724
713
|
base_url="https://financialmodelingprep.com",
|
|
725
714
|
rate_limit=RateLimitConfig(
|
|
726
|
-
daily_limit=250,
|
|
727
|
-
requests_per_second=10,
|
|
728
|
-
requests_per_minute=300
|
|
715
|
+
daily_limit=250, requests_per_second=10, requests_per_minute=300
|
|
729
716
|
),
|
|
730
717
|
logging=LoggingConfig(
|
|
731
718
|
level="DEBUG",
|
|
@@ -733,7 +720,7 @@ config = ClientConfig(
|
|
|
733
720
|
"console": LogHandlerConfig(
|
|
734
721
|
class_name="StreamHandler",
|
|
735
722
|
level="INFO",
|
|
736
|
-
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
723
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
737
724
|
),
|
|
738
725
|
"file": LogHandlerConfig(
|
|
739
726
|
class_name="RotatingFileHandler",
|
|
@@ -742,11 +729,11 @@ config = ClientConfig(
|
|
|
742
729
|
handler_kwargs={
|
|
743
730
|
"filename": "fmp.log",
|
|
744
731
|
"maxBytes": 10485760,
|
|
745
|
-
"backupCount": 5
|
|
746
|
-
}
|
|
747
|
-
)
|
|
748
|
-
}
|
|
749
|
-
)
|
|
732
|
+
"backupCount": 5,
|
|
733
|
+
},
|
|
734
|
+
),
|
|
735
|
+
},
|
|
736
|
+
),
|
|
750
737
|
)
|
|
751
738
|
|
|
752
739
|
client = FMPDataClient(config=config)
|
|
@@ -759,15 +746,15 @@ The library provides a comprehensive exception hierarchy for robust error handli
|
|
|
759
746
|
```python
|
|
760
747
|
from fmp_data import FMPDataClient
|
|
761
748
|
from fmp_data.exceptions import (
|
|
762
|
-
FMPError,
|
|
763
|
-
RateLimitError,
|
|
764
|
-
AuthenticationError,
|
|
765
|
-
ValidationError,
|
|
766
|
-
ConfigError,
|
|
767
|
-
InvalidSymbolError,
|
|
749
|
+
FMPError, # Base exception for all FMP errors
|
|
750
|
+
RateLimitError, # API rate limit exceeded
|
|
751
|
+
AuthenticationError, # Invalid or missing API key
|
|
752
|
+
ValidationError, # Invalid request parameters
|
|
753
|
+
ConfigError, # Configuration errors
|
|
754
|
+
InvalidSymbolError, # Missing or blank required symbol
|
|
768
755
|
InvalidResponseTypeError, # Unexpected API response type
|
|
769
|
-
DependencyError,
|
|
770
|
-
FMPNotFound,
|
|
756
|
+
DependencyError, # Missing optional dependency
|
|
757
|
+
FMPNotFound, # Symbol or resource not found
|
|
771
758
|
)
|
|
772
759
|
|
|
773
760
|
try:
|
|
@@ -227,15 +227,15 @@ from fmp_data import create_vector_store
|
|
|
227
227
|
|
|
228
228
|
# Initialize the vector store
|
|
229
229
|
vector_store = create_vector_store(
|
|
230
|
-
fmp_api_key="YOUR_FMP_API_KEY",
|
|
231
|
-
openai_api_key="YOUR_OPENAI_API_KEY" # pragma: allowlist secret
|
|
230
|
+
fmp_api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
|
|
231
|
+
openai_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
|
|
232
232
|
)
|
|
233
233
|
|
|
234
234
|
# Example queries
|
|
235
235
|
queries = [
|
|
236
236
|
"what is the price of Apple stock?",
|
|
237
237
|
"what was the revenue of Tesla last year?",
|
|
238
|
-
"what's new in the market?"
|
|
238
|
+
"what's new in the market?",
|
|
239
239
|
]
|
|
240
240
|
|
|
241
241
|
# Search for relevant endpoints and tools
|
|
@@ -249,7 +249,7 @@ for query in queries:
|
|
|
249
249
|
for tool in tools:
|
|
250
250
|
print(f"Name: {tool.get('name')}")
|
|
251
251
|
print(f"Description: {tool.get('description')}")
|
|
252
|
-
print("Parameters:", tool.get(
|
|
252
|
+
print("Parameters:", tool.get("parameters"))
|
|
253
253
|
print()
|
|
254
254
|
|
|
255
255
|
# You can also search endpoints directly
|
|
@@ -276,10 +276,10 @@ from fmp_data.lc.embedding import EmbeddingProvider
|
|
|
276
276
|
|
|
277
277
|
# Configure with LangChain support
|
|
278
278
|
config = LangChainConfig(
|
|
279
|
-
api_key="YOUR_FMP_API_KEY",
|
|
279
|
+
api_key="YOUR_FMP_API_KEY", # pragma: allowlist secret
|
|
280
280
|
embedding_provider=EmbeddingProvider.OPENAI,
|
|
281
|
-
embedding_api_key="YOUR_OPENAI_API_KEY",
|
|
282
|
-
embedding_model="text-embedding-3-small"
|
|
281
|
+
embedding_api_key="YOUR_OPENAI_API_KEY", # pragma: allowlist secret
|
|
282
|
+
embedding_model="text-embedding-3-small",
|
|
283
283
|
)
|
|
284
284
|
|
|
285
285
|
# Create client with LangChain config
|
|
@@ -328,23 +328,23 @@ from fmp_data import FMPDataClient, ClientConfig, LoggingConfig
|
|
|
328
328
|
from fmp_data.exceptions import FMPError, RateLimitError, AuthenticationError
|
|
329
329
|
|
|
330
330
|
# Method 1: Initialize with direct API key
|
|
331
|
-
client = FMPDataClient(api_key="your_api_key_here")
|
|
331
|
+
client = FMPDataClient(api_key="your_api_key_here") # pragma: allowlist secret
|
|
332
332
|
|
|
333
333
|
# Method 2: Initialize from environment variable (FMP_API_KEY)
|
|
334
334
|
client = FMPDataClient.from_env()
|
|
335
335
|
|
|
336
336
|
# Method 3: Initialize with custom configuration
|
|
337
337
|
config = ClientConfig(
|
|
338
|
-
api_key="your_api_key_here",
|
|
338
|
+
api_key="your_api_key_here", # pragma: allowlist secret
|
|
339
339
|
timeout=30,
|
|
340
340
|
max_retries=3,
|
|
341
341
|
base_url="https://financialmodelingprep.com",
|
|
342
|
-
logging=LoggingConfig(level="INFO")
|
|
342
|
+
logging=LoggingConfig(level="INFO"),
|
|
343
343
|
)
|
|
344
344
|
client = FMPDataClient(config=config)
|
|
345
345
|
|
|
346
346
|
# Using with context manager (recommended)
|
|
347
|
-
with FMPDataClient(api_key="your_api_key_here") as client:
|
|
347
|
+
with FMPDataClient(api_key="your_api_key_here") as client: # pragma: allowlist secret
|
|
348
348
|
try:
|
|
349
349
|
# Get company profile
|
|
350
350
|
profile = client.company.get_profile("AAPL")
|
|
@@ -422,14 +422,11 @@ with FMPDataClient.from_env() as client:
|
|
|
422
422
|
income_stmt = client.fundamental.get_income_statement(
|
|
423
423
|
"AAPL",
|
|
424
424
|
period="quarter", # or "annual"
|
|
425
|
-
limit=4
|
|
425
|
+
limit=4,
|
|
426
426
|
)
|
|
427
427
|
|
|
428
428
|
# Get balance sheets
|
|
429
|
-
balance_sheet = client.fundamental.get_balance_sheet(
|
|
430
|
-
"AAPL",
|
|
431
|
-
period="annual"
|
|
432
|
-
)
|
|
429
|
+
balance_sheet = client.fundamental.get_balance_sheet("AAPL", period="annual")
|
|
433
430
|
|
|
434
431
|
# Get cash flow statements
|
|
435
432
|
cash_flow = client.fundamental.get_cash_flow("AAPL")
|
|
@@ -445,16 +442,11 @@ with FMPDataClient.from_env() as client:
|
|
|
445
442
|
|
|
446
443
|
# Get historical prices
|
|
447
444
|
history = client.company.get_historical_prices(
|
|
448
|
-
symbol="TSLA",
|
|
449
|
-
from_date=date(2023, 1, 1),
|
|
450
|
-
to_date=date(2023, 12, 31)
|
|
445
|
+
symbol="TSLA", from_date=date(2023, 1, 1), to_date=date(2023, 12, 31)
|
|
451
446
|
)
|
|
452
447
|
|
|
453
448
|
# Get intraday prices
|
|
454
|
-
intraday = client.company.get_intraday_prices(
|
|
455
|
-
"TSLA",
|
|
456
|
-
interval="5min"
|
|
457
|
-
)
|
|
449
|
+
intraday = client.company.get_intraday_prices("TSLA", interval="5min")
|
|
458
450
|
```
|
|
459
451
|
|
|
460
452
|
### 4. Technical Indicators
|
|
@@ -464,25 +456,14 @@ from datetime import date
|
|
|
464
456
|
|
|
465
457
|
with FMPDataClient.from_env() as client:
|
|
466
458
|
# Simple Moving Average
|
|
467
|
-
sma = client.technical.get_sma(
|
|
468
|
-
"AAPL",
|
|
469
|
-
period_length=20,
|
|
470
|
-
timeframe="1day"
|
|
471
|
-
)
|
|
459
|
+
sma = client.technical.get_sma("AAPL", period_length=20, timeframe="1day")
|
|
472
460
|
|
|
473
461
|
# RSI (Relative Strength Index)
|
|
474
|
-
rsi = client.technical.get_rsi(
|
|
475
|
-
"AAPL",
|
|
476
|
-
period_length=14,
|
|
477
|
-
timeframe="1day"
|
|
478
|
-
)
|
|
462
|
+
rsi = client.technical.get_rsi("AAPL", period_length=14, timeframe="1day")
|
|
479
463
|
|
|
480
464
|
# MACD
|
|
481
465
|
macd = client.technical.get_macd(
|
|
482
|
-
"AAPL",
|
|
483
|
-
fast_period=12,
|
|
484
|
-
slow_period=26,
|
|
485
|
-
signal_period=9
|
|
466
|
+
"AAPL", fast_period=12, slow_period=26, signal_period=9
|
|
486
467
|
)
|
|
487
468
|
```
|
|
488
469
|
|
|
@@ -598,6 +579,7 @@ API reference in `docs/api/reference.md#async-client-usage`.
|
|
|
598
579
|
from fmp_data import AsyncFMPDataClient
|
|
599
580
|
import asyncio
|
|
600
581
|
|
|
582
|
+
|
|
601
583
|
async def main():
|
|
602
584
|
async with AsyncFMPDataClient.from_env() as client:
|
|
603
585
|
# All endpoint methods are async
|
|
@@ -613,6 +595,7 @@ async def main():
|
|
|
613
595
|
for p in profiles:
|
|
614
596
|
print(f"{p.symbol}: {p.company_name}")
|
|
615
597
|
|
|
598
|
+
|
|
616
599
|
asyncio.run(main())
|
|
617
600
|
```
|
|
618
601
|
|
|
@@ -645,7 +628,13 @@ FMP_MCP_MANIFEST=/path/to/custom/manifest.py
|
|
|
645
628
|
|
|
646
629
|
### Custom Configuration
|
|
647
630
|
```python
|
|
648
|
-
from fmp_data import
|
|
631
|
+
from fmp_data import (
|
|
632
|
+
FMPDataClient,
|
|
633
|
+
ClientConfig,
|
|
634
|
+
LoggingConfig,
|
|
635
|
+
RateLimitConfig,
|
|
636
|
+
LogHandlerConfig,
|
|
637
|
+
)
|
|
649
638
|
|
|
650
639
|
config = ClientConfig(
|
|
651
640
|
api_key="your_api_key_here", # pragma: allowlist secret
|
|
@@ -653,9 +642,7 @@ config = ClientConfig(
|
|
|
653
642
|
max_retries=3,
|
|
654
643
|
base_url="https://financialmodelingprep.com",
|
|
655
644
|
rate_limit=RateLimitConfig(
|
|
656
|
-
daily_limit=250,
|
|
657
|
-
requests_per_second=10,
|
|
658
|
-
requests_per_minute=300
|
|
645
|
+
daily_limit=250, requests_per_second=10, requests_per_minute=300
|
|
659
646
|
),
|
|
660
647
|
logging=LoggingConfig(
|
|
661
648
|
level="DEBUG",
|
|
@@ -663,7 +650,7 @@ config = ClientConfig(
|
|
|
663
650
|
"console": LogHandlerConfig(
|
|
664
651
|
class_name="StreamHandler",
|
|
665
652
|
level="INFO",
|
|
666
|
-
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
653
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
667
654
|
),
|
|
668
655
|
"file": LogHandlerConfig(
|
|
669
656
|
class_name="RotatingFileHandler",
|
|
@@ -672,11 +659,11 @@ config = ClientConfig(
|
|
|
672
659
|
handler_kwargs={
|
|
673
660
|
"filename": "fmp.log",
|
|
674
661
|
"maxBytes": 10485760,
|
|
675
|
-
"backupCount": 5
|
|
676
|
-
}
|
|
677
|
-
)
|
|
678
|
-
}
|
|
679
|
-
)
|
|
662
|
+
"backupCount": 5,
|
|
663
|
+
},
|
|
664
|
+
),
|
|
665
|
+
},
|
|
666
|
+
),
|
|
680
667
|
)
|
|
681
668
|
|
|
682
669
|
client = FMPDataClient(config=config)
|
|
@@ -689,15 +676,15 @@ The library provides a comprehensive exception hierarchy for robust error handli
|
|
|
689
676
|
```python
|
|
690
677
|
from fmp_data import FMPDataClient
|
|
691
678
|
from fmp_data.exceptions import (
|
|
692
|
-
FMPError,
|
|
693
|
-
RateLimitError,
|
|
694
|
-
AuthenticationError,
|
|
695
|
-
ValidationError,
|
|
696
|
-
ConfigError,
|
|
697
|
-
InvalidSymbolError,
|
|
679
|
+
FMPError, # Base exception for all FMP errors
|
|
680
|
+
RateLimitError, # API rate limit exceeded
|
|
681
|
+
AuthenticationError, # Invalid or missing API key
|
|
682
|
+
ValidationError, # Invalid request parameters
|
|
683
|
+
ConfigError, # Configuration errors
|
|
684
|
+
InvalidSymbolError, # Missing or blank required symbol
|
|
698
685
|
InvalidResponseTypeError, # Unexpected API response type
|
|
699
|
-
DependencyError,
|
|
700
|
-
FMPNotFound,
|
|
686
|
+
DependencyError, # Missing optional dependency
|
|
687
|
+
FMPNotFound, # Symbol or resource not found
|
|
701
688
|
)
|
|
702
689
|
|
|
703
690
|
try:
|