Manufacturing Economic Monitor
A small CLI and Streamlit dashboard for fetching the FRED Industrial Production:
Manufacturing (IPMAN) series, validating the response, saving raw and processed
JSON files, and showing the latest valid manufacturing index.
Setup
Install dependencies:
uv sync
Set FRED_API_KEY in a local .env file when you need to refresh live data.
.env is ignored by Git. Do not commit API keys or downloaded live data.
Tests
Run the fixture-backed test suite:
uv run pytest
Run tests with coverage:
uv run pytest --cov=manufacturing_monitor
Tests use committed files in tests/fixtures/ and mocks/monkeypatching for
external behavior. Routine tests do not contact the live FRED API.
CLI
Run the installed command:
uv run manufacturing-monitor
The compatibility wrapper still works:
uv run main.py
Default output files are:
- raw response:
data/raw/ipman_observations_raw.json - processed observations:
data/processed/ipman_observations_processed.json
Run without contacting FRED:
uv run manufacturing-monitor --project-info
Enable console diagnostics:
uv run manufacturing-monitor --verbose
Write detailed diagnostics to a log file:
uv run manufacturing-monitor --log-file logs/manufacturing-monitor.log
Default behavior does not print diagnostic logs. Logging records request events, validation, saved-file locations, and failures, but not API keys or complete request URLs.
Dashboard
Run the Streamlit dashboard:
uv run streamlit run src/manufacturing_monitor/dashboard.py
The dashboard uses the same API, Pydantic validation, and workflow code as the
CLI. It accepts a FRED API key through a password-style input and also allows the
local environment key from .env.
Validation
Incoming FRED responses are validated with Pydantic before the app uses them. The app rejects:
- non-object top-level responses
- missing or invalid
observations - invalid observation dates
- observation values that are neither numeric strings nor the known FRED
.placeholder
Placeholder values are preserved in processed output but skipped when selecting the latest valid manufacturing index.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manufacturing_economic_monitor-0.2.0.tar.gz.
File metadata
- Download URL: manufacturing_economic_monitor-0.2.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2881e0ae0e070964ca73f3a7dec2f945527233562e69637e8c76ba3c04b93471
|
|
| MD5 |
4d5760cbf85615912770f13ba4897bc7
|
|
| BLAKE2b-256 |
725a228dd4d19413781be13f0550050e3bce63c04341baa1d0d833be190c6a6e
|
File details
Details for the file manufacturing_economic_monitor-0.2.0-py3-none-any.whl.
File metadata
- Download URL: manufacturing_economic_monitor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b2dc0fe1c7ae0750dece48ba67cf2a9c561275c571371dfb4f35befbc73366
|
|
| MD5 |
f8530c722ca527e7c386be7959388c18
|
|
| BLAKE2b-256 |
c25793c151cac7893b404ea2b0359d7c769d6df0c1a8eb19921e7dc9f1bdf414
|