finance-dl includes a batch automation tool —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jbms/finance-dl/llms.txt
Use this file to discover all available pages before exploring further.
finance_dl.update — designed for running many scraper configurations on a schedule. It tracks when each configuration was last successfully run, skips ones that are still fresh, runs the rest in parallel, and writes per-configuration log files so you can audit any failures. This page explains both the status and update subcommands and their flags.
Prerequisites
The update tool requires a log directory to exist before you run it. Create one now if you haven’t already:Base Flags
These flags come before the subcommand and are required for bothstatus and update:
The importable Python module that defines your
CONFIG_<name> functions —
the same module you pass to finance_dl.cli.Path to the directory where log and timestamp files are written. The tool
creates two files per configuration inside this directory:
<config>.txt— full stdout and stderr output from the scraper run<config>.lastupdate— empty file whose modification time records the last successful run
status Subcommand
The status subcommand prints a table showing every configuration in the module and when it was last successfully updated.
NEVER. All others display a human-readable timestamp and how long ago the run completed (for example, 3 minutes ago or 2 days ago).
Example output:
update Subcommand
The update subcommand runs one or more configurations, capturing their output and recording success timestamps.
Selecting Configurations to Run
Update Flags
One or more configuration names to update (positional arguments). Each name
refers to a
CONFIG_<name> function in the config module. Can be combined
with --all, though specifying names is redundant if --all is set.Update every configuration found in the config module by scanning for
functions whose names start with
CONFIG_.Run each configuration even if it was updated within the last 24 hours.
Without this flag, recently updated configurations are silently skipped.
Maximum number of configurations to run concurrently. Each configuration is
launched as a subprocess; up to this many run simultaneously using a thread
pool executor.
By default, any configuration whose
<config>.lastupdate file is less than
24 hours old is skipped with a message like
mybank: SKIPPING (updated 47 minutes ago). Use --force to override this
and re-run regardless of recency.What Happens During a Run
For each selected (non-skipped) configuration, the update tool:- Launches a subprocess:
python -m finance_dl.cli --config-module <module> -c <config> - Streams stdout and stderr from that subprocess to the terminal with a progress prefix.
- Writes all output to
<log-dir>/<config>.txt. - On a zero exit code, touches
<log-dir>/<config>.lastupdateto record the success time. - On a non-zero exit code or exception, prints a
FAILEDmessage and leaves the.lastupdatefile unchanged.
Output Files
| File | Purpose |
|---|---|
logs/<config>.txt | Full log output (stdout + stderr) from the scraper subprocess |
logs/<config>.lastupdate | Empty file; its mtime is used as the last-success timestamp |