CLI

finagg’s command-line interface (CLI). A selection of tools for aggregating popular data and features from each of the supported APIs.

General

Usage: finagg install [OPTIONS]

  Set API keys/user agents, drop and recreate tables, and install the
  recommended datasets into the SQL database.

Options:
  -s, --skip [bea|fred|sec]     Subpackage installations to skip. Useful to
                                avoid reinstalling data that you don't want to
                                when using the general install command.
  -sid, --series TEXT           FRED economic series whose data is attempted
                                to be downloaded and inserted into the SQL
                                tables. Multiple series can be specified by
                                providing multiple `series` options, by
                                separating series with a comma (e.g.,
                                `GDP,FEDFUNDS`), or by providing IDs in a CSV
                                file by specifying a file path (e.g.,
                                `fred_series.txt`). The CSV file can be
                                formatted such that there's one string per
                                line or multiple strings per line (delimited
                                by a comma). The strings specified by this
                                option are combined with the strings specified
                                by the `series-set` option.
  -ss, --series-set [economic]  Set of FRED economic series whose data is
                                attempted to be downloaded and inserted into
                                the SQL tables. 'economic' indicates the
                                recommended and most popular series (e.g.,
                                consumer price index, gross domestic product,
                                etc.).
  -t, --ticker TEXT             Ticker whose data is attempted to be
                                downloaded and inserted into the SQL tables.
                                Multiple tickers can be specified by providing
                                multiple `ticker` options, by separating
                                tickers with a comma (e.g., `AAPL,MSFT,NVDA`),
                                or by providing tickers in a CSV file by
                                specifying a file path (e.g.,
                                `bank_tickers.txt`). The CSV file can be
                                formatted such that there's one ticker per
                                line or multiple tickers per line (delimited
                                by a comma). The tickers specified by this
                                option are combined with the tickers specified
                                by the `ticker-set` option.
  -ts, --ticker-set [sec]       Set of tickers whose data is attempted to be
                                downloaded and inserted into the SQL tables.
                                'sec' indicates all the tickers that have data
                                available through the SEC API (which is
                                approximately all publicly-traded US
                                companies).
  -z, --from-zip                Whether to install raw data from bulk data zip
                                files that're compiled by the SEC nightly.
                                Installing all SEC data with this option can
                                take upwards of 1.5 hours to complete.
  -n, --processes INTEGER       Number of background processes to run in
                                parallel when installing data. Note, not all
                                tables support installations with
                                multiprocessing.
  -r, --recreate-tables         Whether to reset the tables associated with
                                the install options by dropping and recreating
                                them.
  -v, --verbose                 Sets the log level to DEBUG to show
                                installation errors for each ticker.
  --help                        Show this message and exit.

BEA

Usage: finagg bea install [OPTIONS]

  Set the BEA API key.

Options:
  --help  Show this message and exit.

FRED

Usage: finagg fred install [OPTIONS]

  Set the FRED API key, drop and recreate tables, and install the recommended
  tables into the SQL database.

Options:
  --raw [series]                Raw tables to install. `series` indicates raw
                                FRED economic series observations/measurements
                                (e.g., consumer price index, gross domestic
                                product, etc.). At least `series` must be
                                specified to enable installing refined data
                                using the `refined` flag.
  --refined [economic]          Refined tables to install. This requires raw
                                data to be installed beforehand using the
                                `--raw` flag or for the `--raw` flag to be set
                                when this option is provided.
  -a, --all                     Whether to install all defined tables
                                (including all refined tables).
  -sid, --series TEXT           FRED economic series whose data is attempted
                                to be downloaded and inserted into the SQL
                                tables. Multiple series can be specified by
                                providing multiple `series` options, by
                                separating series with a comma (e.g.,
                                `GDP,FEDFUNDS`), or by providing IDs in a CSV
                                file by specifying a file path (e.g.,
                                `fred_series.txt`). The CSV file can be
                                formatted such that there's one string per
                                line or multiple strings per line (delimited
                                by a comma). The strings specified by this
                                option are combined with the strings specified
                                by the `series-set` option.
  -ss, --series-set [economic]  Set of FRED economic series whose data is
                                attempted to be downloaded and inserted into
                                the SQL tables. 'economic' indicates the
                                recommended and most popular series (e.g.,
                                consumer price index, gross domestic product,
                                etc.).
  -r, --recreate-tables         Whether to reset the tables associated with
                                the install options by dropping and recreating
                                them.
  -v, --verbose                 Sets the log level to DEBUG to show
                                installation errors for each series.
  --help                        Show this message and exit.

SEC

Usage: finagg sec install [OPTIONS]

  Set the SEC API key, drop and recreate tables, and install the recommended
  tables into the SQL database.

Options:
  --raw [submissions|tags]        Raw tables to install. `submissions`
                                  indicates company metadata (e.g., company
                                  name, industry code, etc.) while `tags`
                                  indicates SEC EDGAR tags (e.g., earnings-
                                  per-share, current assets, etc.).Both
                                  `submissions` and `tags` must be specified
                                  to enable installing refined data using the
                                  `refined` flag.
  --refined [annual|annual.normalized|quarterly|quarterly.normalized]
                                  Refined tables to install. This requires raw
                                  SEC data to be installed beforehand using
                                  the `--raw` flag or for the `--raw` flag to
                                  be set when this option is provided.
  -a, --all                       Whether to install all defined tables
                                  (including all refined tables).
  -t, --ticker TEXT               Ticker whose data is attempted to be
                                  downloaded and inserted into the SQL tables.
                                  Multiple tickers can be specified by
                                  providing multiple `ticker` options, by
                                  separating tickers with a comma (e.g.,
                                  `AAPL,MSFT,NVDA`), or by providing tickers
                                  in a CSV file by specifying a file path
                                  (e.g., `bank_tickers.txt`). The CSV file can
                                  be formatted such that there's one ticker
                                  per line or multiple tickers per line
                                  (delimited by a comma). The tickers
                                  specified by this option are combined with
                                  the tickers specified by the `ticker-set`
                                  option.
  -ts, --ticker-set [sec]         Set of tickers whose data is attempted to be
                                  downloaded and inserted into the SQL tables.
                                  'sec' indicates all the tickers that have
                                  data available through the SEC API (which is
                                  approximately all publicly-traded US
                                  companies).
  -z, --from-zip                  Whether to install raw data from bulk data
                                  zip files that're compiled by the SEC
                                  nightly. Installing all SEC data with this
                                  option can take upwards of 1.5 hours to
                                  complete.
  -n, --processes INTEGER         Number of background processes to run in
                                  parallel when installing data. Note, not all
                                  tables support installations with
                                  multiprocessing.
  -r, --recreate-tables           Whether to reset the tables associated with
                                  the install options by dropping and
                                  recreating them.
  -v, --verbose                   Sets the log level to DEBUG to show
                                  installation errors for each ticker.
  --help                          Show this message and exit.