No project description provided
Project description
FMP SDK
The idea behind this project is to provide a 'one-stop-shop' to the API endpoints provided by Financial Model Prep website.
Note: fmpsdk should be synced with FMP's API changelog as of 20210220. Changes thereafter are not yet included.
How to Use
- Install the package:
pip install fmpsdk
- Create a .env file and put your apikey in it. Inside .env:
apikey='blah'
- Use
fmpsdk.<some function>(apikey=apikey, <possibly more variables>)
to query the API for that "some function". - The return from that function call is almost always a List of Dictionaries. It is up to you to parse it.
Example code
Here is a "quick start" script example. A larger, more detailed example is in the file fmpsdk-example.py
.
#!/usr/bin/env python3
import os
from dotenv import load_dotenv
import typing
import fmpsdk
# Actual API key is stored in a .env file. Not good to store API key directly in script.
load_dotenv()
apikey = os.environ.get("apikey")
# Company Valuation Methods
symbol: str = "AAPL"
print(f"Company Profile: {fmpsdk.company_profile(apikey=apikey, symbol=symbol)}")
Attribution
Special thanks to the following people who have pitched in on this project! Open source works thanks to people who jump in and help! These are this project's stars. Thank you.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fmpsdk-20240330.0.tar.gz
(16.2 kB
view hashes)
Built Distribution
Close
Hashes for fmpsdk-20240330.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dfb4f8b6281164cc4d34ffb602ec03e59cd7d53e400f63a8595ab8e50838346 |
|
MD5 | 7a2892fba0e5c8b7a9e68eb4ef496ecf |
|
BLAKE2b-256 | f2b8960b0aefb6db146896142307e274efd8168e4ad70bb0e9ebc8fb0f3d0bdf |