A full featured API client for the FRED API web service.
Project description
pyfredapi - Python library for the Federal Reserve Economic Data (FRED) API
pyfredapi
is a full featured Python library that makes it is easy to retrieve data from the Federal Reserve Economic Data (FRED) API web service. pyfredapi
covers all the FRED api endpoints, and can retrieve data from FRED and ALFRED. Data can be returned as a pandas 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 is made with Sphinx and hosted on Read the Docs.
Installation
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 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:
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.
category
- covers the FRED Categories endpointsmaps
- covers the FRED Maps endpointsrelease
- covers the FRED Releases endpointsseries
- covers the FRED Series endpointssources
- covers the FRED Sources endpointstags
- covers the FRED Tags endpointsseries_collection
- makes handling multiple series easier
Quick start example:
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 to get started.
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
Built Distribution
File details
Details for the file pyfredapi-0.9.1.tar.gz
.
File metadata
- Download URL: pyfredapi-0.9.1.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83bbcba018b3b4e6ec8f1bc066df32c9207f75e5d5c03b96639764d6ebc20f7c |
|
MD5 | d95442436df962f0571e88f829eeb6c8 |
|
BLAKE2b-256 | 4967d1c683df6f90d3cfaa725a2af07283d91b6d9cde01f181a1fa92e422f231 |
Provenance
The following attestation bundles were made for pyfredapi-0.9.1.tar.gz
:
Publisher:
publish-to-pypi.yml
on gw-moore/pyfredapi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyfredapi-0.9.1.tar.gz
- Subject digest:
83bbcba018b3b4e6ec8f1bc066df32c9207f75e5d5c03b96639764d6ebc20f7c
- Sigstore transparency entry: 146133781
- Sigstore integration time:
- Predicate type:
File details
Details for the file pyfredapi-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: pyfredapi-0.9.1-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b350726cd2cb4d5db32cf2097fd842480139819c168956674da518946fd40f1f |
|
MD5 | 7d517dfcf6879d7916812ecb24ec37ec |
|
BLAKE2b-256 | 3341cd32c32333e559ed136a763a61e4bc45dfc596787fd6166d5244ad921a2a |
Provenance
The following attestation bundles were made for pyfredapi-0.9.1-py3-none-any.whl
:
Publisher:
publish-to-pypi.yml
on gw-moore/pyfredapi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyfredapi-0.9.1-py3-none-any.whl
- Subject digest:
b350726cd2cb4d5db32cf2097fd842480139819c168956674da518946fd40f1f
- Sigstore transparency entry: 146133782
- Sigstore integration time:
- Predicate type: