Repository navigation
Releases
Releases · Query-farm/vgi-fred
v0.2.0
Full Changelog: v0.1.3...v0.2.0
v0.1.3
v0.1.2
v0.1.1
v0.1.0
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_releaseswithobservationsto show how each 2020 GDP quarter was revised. - Vintage path: joins
vintage_dateswith thealfred_revisionsinterval that covers each date, to trace Q1 2020 GDP across 2020. - Search within a category: filters
search_serieshits to those incategory_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.