Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:12
· 14 commits to main since this release

First release of vgi-fred, a Python VGI worker that exposes FRED and ALFRED economic data from the St. Louis Fed as typed SQL tables for DuckDB and Haybarn. It reads the official FRED API v1, streams results as Arrow batches, and runs over stdio, Unix sockets or HTTP.

Functions

Function Returns
observations(series_id) Current observations, with optional real-time bounds
alfred_observations(series_id, as_of) The series as it was known on one historical date
alfred_revisions(series_id) All revisions, each with its validity interval
initial_releases(series_id) First published values
vintage_dates(series_id) Dates when observations were added or revised
series, search_series Series metadata and keyword search
category, category_children, category_series, series_categories Category tree
releases, release_series, release_dates, sources Releases and data publishers

Composed examples

  • First print vs. today: joins initial_releases with observations to show how each 2020 GDP quarter was revised.
  • Vintage path: joins vintage_dates with the alfred_revisions interval that covers each date, to trace Q1 2020 GDP across 2020.
  • Search within a category: filters search_series hits to those in category_series(32447) (Unemployment Rate).

Install

Requires Python 3.13+ and uv. Set FRED_API_KEY before starting the engine, or create a fred_api secret after attaching.

INSTALL vgi FROM community; LOAD vgi;   -- Haybarn 2.0
ATTACH 'fred' (TYPE vgi,
    LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-fred@v0.1.0 vgi-fred-worker');

SELECT date, value
FROM fred.main.observations('UNRATE', observation_start := '2020-01-01')
ORDER BY date;

For stock DuckDB 2.0, install from the query_farm repository and then run LOAD vgi FROM query_farm (see the README).

Known limits

  • Every live query needs your own FRED API key. FRED's rate limits apply, and the worker spaces its requests (FRED_MIN_INTERVAL_SECONDS, 0.55 s by default).
  • This is a source-only release. The attached wheel and sdist are signed with cosign. Nothing is published to PyPI, and the Docker image is published only by a manual workflow run.