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

This project is under development, please check back later for updates.

Overview

The fmp-py project is an open-source Python library designed to aggregate and manage comprehensive financial data from Financial Modeling Prep (FMP) API. It offers robust functionalities including company searches, retrieval of financial statements, stock price data, price targets, and detailed company information. By integrating seamlessly with the FMP API, fmp-py provides a user-friendly interface for querying and analyzing financial data, supporting diverse search parameters and historical data analysis. This modular and well-organized codebase ensures efficient data handling, making fmp-py a valuable tool for financial analysts and developers seeking streamlined access to financial market insights.


Features

Feature Description
โš™๏ธ Architecture The project features a modular design, with self-contained modules targeting different aspects of financial data processing, ensuring maintainability and scalability.
๐Ÿ”ฉ Code Quality Code adheres to consistent style and format, supported by Ruff integration for code quality and format adherence, and automated testing through GitHub Actions.
๐Ÿ“„ Documentation Comprehensive documentation is available for modules, detailing their purpose and key features. Sphinx is used for generating documentation, ensuring high quality and consistency.
๐Ÿ”Œ Integrations Integrates with the Financial Modeling Prep API to retrieve comprehensive financial data. Includes dependencies like requests, pandas, and various Sphinx extensions.
๐Ÿงฉ Modularity Highly modular with each file representing a specific aspect of financial data, promoting reusability and ease of maintenance. Standardized interfaces across modules enhance usability.
๐Ÿงช Testing Employs automated testing workflows via GitHub Actions. Uses requests-mock for API interaction testing, ensuring robust and reliable code.
โšก๏ธ Performance Efficient data retrieval and processing mechanisms in place. Utilizes pandas for data manipulation, ensuring high-speed operations and minimal resource usage.
๐Ÿ›ก๏ธ Security Uses dotenv for managing environment variables and API keys securely. Ensures data is correctly sanitized and validated before processing.
๐Ÿ“ฆ Dependencies Key dependencies include requests, pandas, python-dotenv, Sphinx, and poetry for package management. These libraries are essential for API interaction, data handling, and documentation.
๐Ÿš€ Scalability Designed to handle large volumes of financial data. Modular architecture and efficient data processing ensure it can scale with increased data input and user demand.

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_valuation.py
    โ”‚       โ””โ”€โ”€ models
    โ”‚           โ”œโ”€โ”€ company_information.py
    โ”‚           โ”œโ”€โ”€ price_targets.py
    โ”‚           โ”œโ”€โ”€ quote.py
    โ”‚           โ”œโ”€โ”€ statement_analysis.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_valuation.py

Modules

.
File Summary
pyproject.toml Define project metadata, dependencies, and build configurations using Poetry. Enable robust dependency management and streamline project setup for contributors and users. Facilitate consistent development, testing, and documentation standards across the fmp-py repository. Optimize code quality and format adherence through Ruff integration.
src.fmp_py
File Summary
fmp_financial_statements.py Company Search FunctionalityEnables detailed searching for company information using various parameters.2. **Integration with FMP APISeamlessly connects to the Financial Modeling Prep services to fetch and return relevant company data.3. **User-Friendly InterfaceDesigned to be intuitive and easy to use, aligning with the repositoryโ€™s goal of providing accessible financial data management and retrieval tools.This module complements other components like fmp_financial_statements.py and fmp_quote.py, together forming a cohesive toolkit for comprehensive financial data analysis and operations.
fmp_company_search.py Enable comprehensive company searches on Financial Modeling Prep using various identifiers like ISIN, CUSIP, and CIK, as well as by name, ticker, or general query. Facilitate robust querying capabilities and streamline retrieval of detailed company information, supporting diverse search parameters and filters.
fmp_historical_data.py Facilitate the retrieval of both daily and intraday historical stock price data, with functionality to prepare and format this data, including calculating the Volume Weighted Average Price (VWAP). Integrate with Financial Modeling Prep API and handle various time intervals and date ranges for comprehensive historical data analysis.
fmp_quote.py Fmp_company_information.py****Purpose:**The fmp_company_information.pyfile is a critical component within thesrc/fmp_pydirectory of thefmp-pyrepository. Its main purpose is to facilitate the retrieval and management of company-related information from the underlying financial market APIs integrated within thefmp-pypackage.**Critical Features:**-**Data Retrieval:** Provides functionalities to fetch comprehensive company information, such as company profiles, details, and relevant metadata.-**API Integration:** Acts as an intermediary to seamlessly integrate the external financial market APIs, ensuring the data is correctly fetched and formatted.-**Information Structuring:** Organizes and structures the acquired data into a usable format for other modules and end-users within the package.By encapsulating these functionalities,fmp_company_information.pyplays a pivotal role in the architecture of thefmp-py` repository, enhancing its capability to deliver precise and structured company information to users.
fmp_statement_analysis.py Fmp_company_information.py**Purpose:**The fmp_company_information.pymodule focuses on retrieving and managing company-related data. This includes essential information about a company, such as its profile, executives, and other relevant metadata.**Critical Features:**-Defines methods for fetching detailed company profiles.-Supports functionalities to access executive profiles and other metadata.-Acts as a critical link within the parent repository for obtaining company-specific information, ensuring that users can easily access and manipulate company data.### Relation to Parent Repository:Within the architecture of the fmp-py" repository, this code serves as a specialized component responsible for handling all operations and queries related to company information. It complements other modules likefmp_financial_statementsandfmp_quote`, together providing a comprehensive toolkit for financial data analysis and retrieval.
fmp_company_information.py Summary for fmp_company_information.py:**Purposefmp_company_information.py focuses on retrieving and managing company information data from the Financial Modeling Prep (FMP) API, serving as a critical module within the broader fmp-py library.**Key Features-**Data RetrievalFacilitates easy access to detailed company information such as profiles, management, and financial metrics.-**IntegrationSeamlessly integrates with other modules in fmp-py to provide comprehensive financial data analysis.-**Utility FunctionsIncludes utility functions for processing and formatting the retrieved data, ensuring consistency and usability across the fmp-py package.In the context of the repository's architecture, this module plays a vital role in enhancing the data richness and analytical capabilities of the fmp-py package, supporting both individual and interconnected functionalities.---This summary highlights the main purpose and key features of the fmp_company_information.py file without delving into the specific technicalities of its implementation.
fmp_valuation.py Each file represents a self-contained module targeting a particular aspect of financial data, ensuring the codebase is modular and easy to maintain.2. **Interface ConsistencyAll modules follow a standardized interface, promoting ease of use across different financial data types.3. **Model IntegrityThe models sub-directory contains definitions for data structures used across various modules, ensuring consistent data handling and manipulation.By organizing the code in this manner, the repository ensures that users can easily find and utilize specific financial functionalities, promoting a robust and scalable architecture.
fmp_base.py Serves as the foundational component for API interactions within the repository, offering methods for initializing API access, sanitizing data types, and handling GET requests. Ensures session management and error handling for seamless integration with Financial Modeling Preps endpoints.
fmp_stock_list.py Retrieve and organize a comprehensive list of stock market data from Financial Modeling Prep API, including available indexes, exchange symbols, symbol changes, CIK list, commitment of traders report, and various other stock-related information. Provide robust data processing and error handling capabilities.
fmp_price_targets.py Retrieve detailed price targets from the Financial Modeling Prep API, including consensus, summary, and individual target data. Facilitate data manipulation using Pandas and handle API interactions and error management. Integrate seamlessly within the broader architecture to enrich financial analysis capabilities for users.
src.fmp_py.models
File Summary
price_targets.py Defines data structures for managing and organizing price target information related to stocks. Plays a crucial role in structuring financial data for further analysis and reporting within the repositoryโ€™s broader financial modeling and prediction capabilities.
statement_analysis.py Define data structures essential for financial statement analysis, encapsulating financial scores, key ratios, and metrics. Facilitate the organization and retrieval of comprehensive financial data attributes, which support the repositorys goal of providing robust financial market analysis tools.
company_information.py Define data structures for company-related information, including core details, market capitalization, executive compensation, and company profiles, enabling organized and standardized storage of this data within the parent repositorys financial market platform.
quote.py Provide data structures for various financial market quotes, including real-time prices, forex, crypto, and aftermarket trades, to encapsulate a range of financial data. Each class captures essential attributes relevant to specific market contexts, integrating seamlessly into the repositorys architecture for comprehensive financial data analysis.
valuation.py Provide data structures for discounted cash flow and company ratings within the valuation module, enabling efficient storage and retrieval of financial metrics and recommendations in the parent repositorys financial model package.
.github.workflows
File Summary
test-package.yaml Facilitates automated testing of the repository by defining workflows that run tests on code changes, ensuring code quality and functionality remain intact. Integrates with GitHub Actions to provide continuous integration and streamlined development processes through automated validation.

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.12.tar.gz (47.2 kB view hashes)

Uploaded Source

Built Distribution

fmp_py-0.0.12-py3-none-any.whl (48.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