Skip to main content

No project description provided

Project description

project-logo

FMP-PY

Empower Your Financial Insights with Seamless FMP API Integration

GitHub Actions Workflow Status license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

precommit Poetry Python GitHub%20Actions pandas


Table of Contents

Overview

The fmp-py project is a Python package designed to interface seamlessly with the Financial Modeling Prep (FMP) API, providing robust functionality for financial data retrieval and analysis. It features modules for obtaining stock upgrades and downgrades, company profiles, financial statements, historical and intraday market data, price targets, and comprehensive valuation metrics. By centralizing diverse financial data in a structured and accessible manner, fmp-py enables users to perform in-depth financial analysis, aiding informed decision-making and enhancing the efficiency of financial research and reporting activities. Its cohesive design ensures consistency and ease of use across various financial data needs.


Features

Feature Description
โš™๏ธ Architecture The project follows a modular structure, segregating functionalities across multiple Python modules. It leverages the Financial Modeling Prep API to retrieve and manipulate financial data.
๐Ÿ”ฉ Code Quality The repository's code adheres to standard Python code styles, utilizing tools like ruff for linting, ensuring readability, and maintainability.
๐Ÿ“„ Documentation The project is well-documented using Sphinx, which offers comprehensive API documentation and usage examples, facilitating ease of understanding for new contributors.
๐Ÿ”Œ Integrations Integrates with Financial Modeling Prep API for data retrieval and GitHub Actions for continuous integration and testing. External tools like Poetry manage dependencies.
๐Ÿงฉ Modularity The codebase is highly modular, with distinct modules for various financial data operations like company search, historical data, and financial statements, promoting reusability and ease of maintenance.
๐Ÿงช Testing The project employs requests-mock for mocking API calls and GitHub Actions for continuous integration, ensuring robust and reliable test coverage.
โšก๏ธ Performance Performance details are not explicitly discussed, but given its API-based architecture, efficiency largely relies on the Financial Modeling Prep API's response time and the effective use of data manipulation libraries like pandas.
๐Ÿ›ก๏ธ Security API key management is handled securely through environmental variables, ensuring sensitive data such as API keys are not hard-coded. No explicit mention of further security measures.
๐Ÿ“ฆ Dependencies Key dependencies include python-dotenv, sphinx, requests, ruff, requests-mock, pandas, pendulum, pre-commit, and sphinx-rtd-theme.
๐Ÿš€ Scalability The project's modularity and reliance on external APIs imply it can scale with increased data volume and complexity, provided the external API can handle the load.

Repository Structure

โ””โ”€โ”€ fmp-py/
    โ”œโ”€โ”€ .github
    โ”‚   โ”œโ”€โ”€ ISSUE_TEMPLATE
    โ”‚   โ”‚   โ”œโ”€โ”€ bug_report.md
    โ”‚   โ”‚   โ”œโ”€โ”€ custom.md
    โ”‚   โ”‚   โ””โ”€โ”€ feature_request.md
    โ”‚   โ””โ”€โ”€ workflows
    โ”‚       โ””โ”€โ”€ test-package.yaml
    โ”œโ”€โ”€ CODE_OF_CONDUCT.md
    โ”œโ”€โ”€ LICENSE
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ SECURITY.md
    โ”œโ”€โ”€ docs
    โ”‚   โ”œโ”€โ”€ Makefile
    โ”‚   โ”œโ”€โ”€ make.bat
    โ”‚   โ”œโ”€โ”€ rtd_requirements.txt
    โ”‚   โ””โ”€โ”€ source
    โ”‚       โ”œโ”€โ”€ conf.py
    โ”‚       โ””โ”€โ”€ index.md
    โ”œโ”€โ”€ poetry.lock
    โ”œโ”€โ”€ pyproject.toml
    โ”œโ”€โ”€ pytest.ini
    โ”œโ”€โ”€ src
    โ”‚   โ””โ”€โ”€ fmp_py
    โ”‚       โ”œโ”€โ”€ __init__.py
    โ”‚       โ”œโ”€โ”€ fmp_base.py
    โ”‚       โ”œโ”€โ”€ fmp_company_information.py
    โ”‚       โ”œโ”€โ”€ fmp_company_search.py
    โ”‚       โ”œโ”€โ”€ fmp_financial_statements.py
    โ”‚       โ”œโ”€โ”€ fmp_historical_data.py
    โ”‚       โ”œโ”€โ”€ fmp_price_targets.py
    โ”‚       โ”œโ”€โ”€ fmp_quote.py
    โ”‚       โ”œโ”€โ”€ fmp_statement_analysis.py
    โ”‚       โ”œโ”€โ”€ fmp_stock_list.py
    โ”‚       โ”œโ”€โ”€ fmp_upgrades_downgrades.py
    โ”‚       โ”œโ”€โ”€ fmp_valuation.py
    โ”‚       โ””โ”€โ”€ models
    โ”‚           โ”œโ”€โ”€ company_information.py
    โ”‚           โ”œโ”€โ”€ price_targets.py
    โ”‚           โ”œโ”€โ”€ quote.py
    โ”‚           โ”œโ”€โ”€ statement_analysis.py
    โ”‚           โ”œโ”€โ”€ upgrades_downgrades.py
    โ”‚           โ””โ”€โ”€ valuation.py
    โ””โ”€โ”€ tests
        โ”œโ”€โ”€ __init__.py
        โ”œโ”€โ”€ test_fmp_company_information.py
        โ”œโ”€โ”€ test_fmp_company_search.py
        โ”œโ”€โ”€ test_fmp_financial_statements.py
        โ”œโ”€โ”€ test_fmp_historical_data.py
        โ”œโ”€โ”€ test_fmp_price_targets.py
        โ”œโ”€โ”€ test_fmp_quote.py
        โ”œโ”€โ”€ test_fmp_statement_analysis.py
        โ”œโ”€โ”€ test_fmp_stock_list.py
        โ”œโ”€โ”€ test_fmp_upgrades_downgrades.py
        โ””โ”€โ”€ test_fmp_valuation.py

Modules

.
File Summary
pyproject.toml Define project metadata and dependencies for the Python package fmp-py. Establish essential configurations for tools like Poetry, Ruff, and Sphinx, streamlining development, testing, documentation, and dependency management. Centralize settings, ensuring consistency across various environments and facilitating smooth project setup and maintenance.
src.fmp_py
File Summary
fmp_upgrades_downgrades.py Provide methods for retrieving stock upgrade and downgrade data from the Financial Modeling Prep API, focusing on individual symbols, company-specific data, and RSS feeds. Enable the analysis of stock performance metrics such as consensus ratings and historical grading, enhancing financial decision-making capabilities within the repository architecture.
fmp_financial_statements.py Summary for fmp_company_information.pyThe fmp_company_information.py file within the fmp-py repository is responsible for handling the retrieval and management of company-related information. This module serves as a fundamental component in fetching detailed company data such as profiles, key metrics, and other essential informational attributes from the external source it interfaces with. The functionality it provides is pivotal for users who need comprehensive company information for analysis, reporting, or integration into broader financial systems. It integrates seamlessly with other modules in the src/fmp_py directory to offer a holistic approach to financial data processing within the repositorys architecture.
fmp_company_search.py Facilitates company searches on Financial Modeling Prep by providing various methods such as ISIN, CUSIP, CIK, company name, and ticker searches. Converts search results into structured DataFrames, assisting users in accessing detailed company information efficiently within the repositorys data retrieval architecture.
fmp_historical_data.py Facilitates retrieval and preparation of historical and intraday market data for financial assets by integrating with the Financial Modeling Prep API. Provides essential data manipulation functionalities like VWAP calculation and price rounding, ensuring data consistency and usability within the repositorys broader framework for financial analysis.
fmp_quote.py Summary of fmp_company_search.pyThe fmp_company_search.py file is part of the fmp-py repository, which appears to be a Python package designed to interact with financial data. This specific file focuses on enabling users to search for company information, likely by querying a financial database or API. It plays a critical role in the parent repositorys architecture by providing essential functionality for identifying and retrieving details on companies, which can be used in various financial analyses or reporting tools available in the package. This feature complements the other modules, such as financial statements and historical data management, to offer a comprehensive toolkit for financial data analysis.
fmp_statement_analysis.py The fmp_company_information.py file within the fmp-py repository serves as a crucial module that provides functionalities to retrieve and manage company-related data. It operates as a key component of the fmp_py package, integrating with other modules to offer comprehensive financial data services. This file specifically focuses on fetching detailed company information essential for users aiming to perform in-depth financial analysis and research. It complements other modules in the repository, such as those handling financial statements, historical data, and stock valuations, to create a robust financial data analysis toolset.
fmp_company_information.py The fmp_company_search.py file within the fmp-py repository is dedicated to handling operations related to searching for company information using the Financial Modeling Prep (FMP) API. This file is a crucial component of the repositorys architecture, enabling users to query and retrieve detailed data about various companies, such as their names, symbols, and other identifiers. It plays an essential role in providing an interface for accessing and filtering company data, thereby supporting the broader objective of the repository which is to facilitate financial data retrieval and analysis through an organized and accessible set of API endpoints and models.
fmp_valuation.py Summary of fmp_company_information.pyThe fmp_company_information.py file is a part of the fmp-py repository, which is structured to provide various functionalities related to financial market data through Python modules. The primary purpose of this specific file is to handle the retrieval and processing of detailed company information. This module interacts with external data sources to gather comprehensive company data, which can then be utilized by other modules or directly by users for financial analysis and decision-making.In the context of the repositorys architecture, this file is crucial for ensuring that accurate and updated company-specific information is available, thereby supporting the broader goal of offering a robust financial market data toolkit. The data managed by this module includes company profiles, key financial metrics, and other relevant corporate information that is essential for users conducting thorough financial research and analysis.
fmp_base.py Facilitates core API interaction for the Financial Modeling Prep library by managing API key authentication, making GET requests, and parsing JSON responses. Provides utility functions to clean and convert data types and ensures proper session management. Central to all API-related functionalities in the repository.
fmp_stock_list.py FmpStockList class interacts with the Financial Modeling Prep API to retrieve various lists of stocks, ETFs, indexes, and exchange symbols. It provides essential stock market data and updates, aiding users in comprehensive financial analysis and decision-making within the broader repository architecture.
fmp_price_targets.py Retrieve and organize price target data for stocks from the Financial Modeling Prep API, including detailed summaries, consensus figures, and historical targets, presented in a structured DataFrame format. This enhances the repositorys capabilities for comprehensive financial analysis and target assessments.
src.fmp_py.models
File Summary
price_targets.py Defines data structures for organizing and representing stock price target information, aiding in the retrieval and analysis of price targets across different timeframes. Facilitates structured storage of high, low, consensus, and median targets, enhancing the parent repositorys capability to handle detailed financial data.
statement_analysis.py Define data models for key financial metrics and scores used in analyzing a companys financial health, including ratios and key performance indicators. These models standardize the representation of financial data, facilitating efficient data manipulation and integration within the broader financial analysis functionalities of the fmp-py repository.
company_information.py Defines data models representing various aspects of company information, including stock peers, core details, market capitalization, executive compensation, and company profiles. These models are integral to structuring and managing financial data within the repository, facilitating efficient data handling and interaction across different modules.
quote.py Define data structures for various types of market quotes and pricing information, including stocks, forex, crypto, aftermarket data, and price changes, supporting the repositorys functionality for comprehensive financial market data retrieval and analysis.
upgrades_downgrades.py Models and manages data for stock analyst ratings, capturing the number of recommendations by type (strong buy, buy, hold, sell, and strong sell) and consensus. Integrates into the broader functionality of the repository, which focuses on financial market analysis and predictions.
valuation.py Define data structures to model discounted cash flow and company ratings, enabling accurate financial analysis and valuation within the repository. Standardize financial data representation to support various valuation methods and company performance assessments, aligning with the overarching goal of providing comprehensive financial market data tools.
.github.workflows
File Summary
test-package.yaml Automates continuous integration by defining the workflow for running tests. Ensures code quality and stability in the repository through systematic testing. Integrates with GitHub Actions to trigger tests upon code changes, reinforcing the reliability of the package by catching issues early in the development process.

Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/TexasCoding/fmp-py
    
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
    
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
    
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
    
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

This project is protected under the MIT License. For more details, refer to the LICENSE file.

Return


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fmp_py-0.0.13.tar.gz (50.0 kB view hashes)

Uploaded Source

Built Distribution

fmp_py-0.0.13-py3-none-any.whl (51.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page