pyfredapi


Namepyfredapi JSON
Version 0.8.0 PyPI version JSON
download
home_page
SummaryA full featured API client for the FRED API web service.
upload_time2023-04-28 02:27:53
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords economic data economic data api economic data api client economic indicators economic statistics economic time series economics federal reserve fred
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pyfredapi.svg?color=blue&label=Downloads)](https://pypi.org/project/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/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=alert_status)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=security_rating)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) |

</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": "",
    "name": "pyfredapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "economic data,economic data api,economic data api client,economic indicators,economic statistics,economic time series,economics,federal reserve,fred",
    "author": "",
    "author_email": "Greg Moore <gwmoore.career@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e3/a9/971088be6239337404f88940686b83ae184b63c28dc0c48bc105a34a4978/pyfredapi-0.8.0.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) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pyfredapi.svg?color=blue&label=Downloads)](https://pypi.org/project/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/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=alert_status)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=security_rating)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=gw-moore_pyfredapi&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=gw-moore_pyfredapi) |\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": "",
    "summary": "A full featured API client for the FRED API web service.",
    "version": "0.8.0",
    "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": "01a64707d5c72b9e519da2e08d5686ec45e4deb5d2cdcca504ccba018c004fb7",
                "md5": "b695f543cd4bd95881e6929b31e80c82",
                "sha256": "85ad7acd8e8543ec7a9a038138ff6d5b7e2d7fc0d5243805eeedaab21ae4efed"
            },
            "downloads": -1,
            "filename": "pyfredapi-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b695f543cd4bd95881e6929b31e80c82",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23415,
            "upload_time": "2023-04-28T02:27:50",
            "upload_time_iso_8601": "2023-04-28T02:27:50.250937Z",
            "url": "https://files.pythonhosted.org/packages/01/a6/4707d5c72b9e519da2e08d5686ec45e4deb5d2cdcca504ccba018c004fb7/pyfredapi-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3a9971088be6239337404f88940686b83ae184b63c28dc0c48bc105a34a4978",
                "md5": "1e8bb6834ccd6b62233d0000b9216f83",
                "sha256": "7bbba748571ba084fd7cb4a2d7303b0fc2029d6420ae08de261631ede003b37e"
            },
            "downloads": -1,
            "filename": "pyfredapi-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1e8bb6834ccd6b62233d0000b9216f83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5548717,
            "upload_time": "2023-04-28T02:27:53",
            "upload_time_iso_8601": "2023-04-28T02:27:53.676567Z",
            "url": "https://files.pythonhosted.org/packages/e3/a9/971088be6239337404f88940686b83ae184b63c28dc0c48bc105a34a4978/pyfredapi-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-28 02:27:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pyfredapi"
}
        
Elapsed time: 0.05981s