# pyfredapi - Python library for the Federal Reserve Economic Data (FRED) API
<div align="center">
| | |
| :--- | :--- |
| CI/CD | [![CI - Test](https://github.com/gw-moore/pyfredapi/actions/workflows/test.yml/badge.svg)](https://github.com/gw-moore/pyfredapi/actions/workflows/test.yml)|
| Docs | [![Documentation Status](https://readthedocs.org/projects/pyfredapi/badge/?version=latest)](https://pyfredapi.readthedocs.io/en/latest/?badge=latest) |
| Package | [![PyPi Version](https://img.shields.io/pypi/v/pyfredapi.svg)](https://pypi.python.org/pypi/pyfredapi/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/pyfredapi)](https://pypi.python.org/pypi/pyfredapi) |
| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |
</div>
-----
`pyfredapi` is a full featured Python library that makes it is easy to retrieve data from the [Federal Reserve Economic Data](https://fred.stlouisfed.org/docs/api/fred/) (FRED) API web service. `pyfredapi` covers all the FRED api endpoints, and can retrieve data from [FRED](https://fred.stlouisfed.org/) and [ALFRED](https://alfred.stlouisfed.org). Data can be returned as a [pandas](https://pandas.pydata.org/) dataframe or json. Requests to the FRED API can be customized according to the parameters made available by the web service endpoints.
## Documentation
The [documentation](https://pyfredapi.readthedocs.io/en/latest/) is made with [Sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [Read the Docs](https://readthedocs.org/).
## Installation
```bash
pip install pyfredapi
# install with plotting dependencies
pip install 'pyfredapi[plot]'
```
## Quick Start
### FRED API Key
Before using `pyfredapi` and must have an API key to the FRED API web service. You can apply for [one for free](https://fred.stlouisfed.org/docs/api/api_key.html) on the FRED website.
You can set your API key in two ways:
* set your API key to the environment variable `FRED_API_KEY`
* pass it to the `api_key` parameter of the request function
You can set the API key as an environment variable by adding the following line to your `~/.zshrc`, `~/.bashrc` file:
```bash
export FRED_API_KEY="your_api_key"
```
### Using pyfredapi
Each of the FRED API endpoint namespaces is covered by a module in `pyfredapi`. For a deeper dive into each of the modules see the tutorials and API reference in the [documentation](https://pyfredapi.readthedocs.io/en/latest/).
- `category` - covers the FRED Categories endpoints
- `maps` - covers the FRED Maps endpoints
- `release` - covers the FRED Releases endpoints
- `series` - covers the FRED Series endpoints
- `sources` - covers the FRED Sources endpoints
- `tags` - covers the FRED Tags endpoints
- `series_collection` - makes handling multiple series easier
Quick start example:
```python
import pyfredapi as pf
# api key set as environment variable
pf.get_series(series_id="GDP")
# api key passed to the function
pf.get_series(series_id="GDP", api_key="my_api_key")
```
## Contributing
Thank you for your interest in contributing to `pyfredapi`. Check out the [contributing guide](https://pyfredapi.readthedocs.io/en/latest/references/CONTRIBUTING.html) to get started.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyfredapi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "economic data, economic data api, economic data api client, economic indicators, economic statistics, economic time series, economics, federal reserve, fred",
"author": null,
"author_email": "Greg Moore <gwmoore.career@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/49/67/d1c683df6f90d3cfaa725a2af07283d91b6d9cde01f181a1fa92e422f231/pyfredapi-0.9.1.tar.gz",
"platform": null,
"description": "# pyfredapi - Python library for the Federal Reserve Economic Data (FRED) API\n\n<div align=\"center\">\n\n\n| | |\n| :--- | :--- |\n| CI/CD | [![CI - Test](https://github.com/gw-moore/pyfredapi/actions/workflows/test.yml/badge.svg)](https://github.com/gw-moore/pyfredapi/actions/workflows/test.yml)|\n| Docs | [![Documentation Status](https://readthedocs.org/projects/pyfredapi/badge/?version=latest)](https://pyfredapi.readthedocs.io/en/latest/?badge=latest) |\n| Package | [![PyPi Version](https://img.shields.io/pypi/v/pyfredapi.svg)](https://pypi.python.org/pypi/pyfredapi/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/pyfredapi)](https://pypi.python.org/pypi/pyfredapi) |\n| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |\n\n</div>\n\n-----\n\n`pyfredapi` is a full featured Python library that makes it is easy to retrieve data from the [Federal Reserve Economic Data](https://fred.stlouisfed.org/docs/api/fred/) (FRED) API web service. `pyfredapi` covers all the FRED api endpoints, and can retrieve data from [FRED](https://fred.stlouisfed.org/) and [ALFRED](https://alfred.stlouisfed.org). Data can be returned as a [pandas](https://pandas.pydata.org/) dataframe or json. Requests to the FRED API can be customized according to the parameters made available by the web service endpoints.\n\n## Documentation\n\nThe [documentation](https://pyfredapi.readthedocs.io/en/latest/) is made with [Sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [Read the Docs](https://readthedocs.org/).\n\n## Installation\n\n```bash\npip install pyfredapi\n\n# install with plotting dependencies\npip install 'pyfredapi[plot]'\n```\n\n## Quick Start\n\n### FRED API Key\n\nBefore using `pyfredapi` and must have an API key to the FRED API web service. You can apply for [one for free](https://fred.stlouisfed.org/docs/api/api_key.html) on the FRED website.\n\nYou can set your API key in two ways:\n\n* set your API key to the environment variable `FRED_API_KEY`\n* pass it to the `api_key` parameter of the request function\n\nYou can set the API key as an environment variable by adding the following line to your `~/.zshrc`, `~/.bashrc` file:\n\n```bash\nexport FRED_API_KEY=\"your_api_key\"\n```\n\n### Using pyfredapi\n\nEach of the FRED API endpoint namespaces is covered by a module in `pyfredapi`. For a deeper dive into each of the modules see the tutorials and API reference in the [documentation](https://pyfredapi.readthedocs.io/en/latest/).\n\n- `category` - covers the FRED Categories endpoints\n- `maps` - covers the FRED Maps endpoints\n- `release` - covers the FRED Releases endpoints\n- `series` - covers the FRED Series endpoints\n- `sources` - covers the FRED Sources endpoints\n- `tags` - covers the FRED Tags endpoints\n- `series_collection` - makes handling multiple series easier\n\nQuick start example:\n\n```python\nimport pyfredapi as pf\n\n# api key set as environment variable\npf.get_series(series_id=\"GDP\")\n\n# api key passed to the function\npf.get_series(series_id=\"GDP\", api_key=\"my_api_key\")\n```\n\n## Contributing\n\nThank you for your interest in contributing to `pyfredapi`. Check out the [contributing guide](https://pyfredapi.readthedocs.io/en/latest/references/CONTRIBUTING.html) to get started.\n",
"bugtrack_url": null,
"license": null,
"summary": "A full featured API client for the FRED API web service.",
"version": "0.9.1",
"project_urls": {
"Homepage": "https://pyfredapi.readthedocs.io/en/latest/",
"Source": "https://github.com/gw-moore/pyfredapi"
},
"split_keywords": [
"economic data",
" economic data api",
" economic data api client",
" economic indicators",
" economic statistics",
" economic time series",
" economics",
" federal reserve",
" fred"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3341cd32c32333e559ed136a763a61e4bc45dfc596787fd6166d5244ad921a2a",
"md5": "7d517dfcf6879d7916812ecb24ec37ec",
"sha256": "b350726cd2cb4d5db32cf2097fd842480139819c168956674da518946fd40f1f"
},
"downloads": -1,
"filename": "pyfredapi-0.9.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d517dfcf6879d7916812ecb24ec37ec",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 23926,
"upload_time": "2024-11-02T17:26:55",
"upload_time_iso_8601": "2024-11-02T17:26:55.039897Z",
"url": "https://files.pythonhosted.org/packages/33/41/cd32c32333e559ed136a763a61e4bc45dfc596787fd6166d5244ad921a2a/pyfredapi-0.9.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4967d1c683df6f90d3cfaa725a2af07283d91b6d9cde01f181a1fa92e422f231",
"md5": "d95442436df962f0571e88f829eeb6c8",
"sha256": "83bbcba018b3b4e6ec8f1bc066df32c9207f75e5d5c03b96639764d6ebc20f7c"
},
"downloads": -1,
"filename": "pyfredapi-0.9.1.tar.gz",
"has_sig": false,
"md5_digest": "d95442436df962f0571e88f829eeb6c8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5595643,
"upload_time": "2024-11-02T17:26:57",
"upload_time_iso_8601": "2024-11-02T17:26:57.214165Z",
"url": "https://files.pythonhosted.org/packages/49/67/d1c683df6f90d3cfaa725a2af07283d91b6d9cde01f181a1fa92e422f231/pyfredapi-0.9.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-02 17:26:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gw-moore",
"github_project": "pyfredapi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "pyfredapi"
}