imfp
, by Christopher C. Smith, is a Python package for downloading data from the International Monetary Fund's RESTful JSON API.
pip install -q --upgrade imfp
import imfp
# Get list of available databases
databases = imfp.imf_databases()
# Get parameters for a specific database (e.g., PCPS - Primary Commodity Price System)
params = imfp.imf_parameters("PCPS")
# Fetch data with specific parameters
df = imfp.imf_dataset(
database_id="PCPS",
freq=["A"],
start_year=2000,
end_year=2015
)
- Comprehensive access to IMF's extensive economic databases
- Parameter discovery
- Rate limit and bandwidth management
- Returns data in pandas DataFrames
We welcome contributions to improve imfp
! Here's how you can help:
- If you find a bug, please open an issue
- To fix a bug:
- Fork and clone the repository and open a terminal in the repository directory
- Install uv with
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install the dependencies with
uv sync --extra dev
- Install a git hook to enforce conventional commits with
curl -o- https://raw.githubusercontent.com/tapsellorg/conventional-commits-git-hook/master/scripts/install.sh | sh
- Create a fix, commit it with an "Angular-style Conventional Commit" message, and push it to your fork
- Open a pull request to our
main
branch
Note that if you want to change and/or render the documentation, you will need to install the Quarto CLI tool.
Version incrementing, package building, testing, changelog generation, documentation rendering, publishing to PyPI, and Github release creation is handled automatically by the GitHub Actions workflow based on the commit messages.