libfec
CLI Reference
WARNING
This documentation is incomplete!
All commands and flags for the libfec
CLI.
libfec export
Export FEC filings into various formats like SQLite, CSV, JSON, and Excel.
bash
Export FEC filings into SQLite, Excel, CSV, or JSON
Usage: libfec export [OPTIONS] [FILINGS]...
Arguments:
[FILINGS]...
Options:
-f, --format <FORMAT> Output file [possible values: sqlite, excel, csv, json]
--target <TARGET> Output file [possible values: schedule-a, schedule-b]
-o, --output <OUTPUT> Output file
--output-directory <OUTPUT_DIRECTORY> Output directory
--clobber Overwrite existing files
--cover-only Only export cover records, not itemizations
-h, --help Print help
FEC API options:
--committee <COMMITTEE>
Filter filings to only these committees
--candidate <CANDIDATE>
Filter filings to only these candidates
--form-type <FORM_TYPE>
Form type to filter filings by (e.g. 'F3', 'F3X', 'F1', 'F2', etc)
--committee-type <COMMITTEE_TYPE>
one-letter type code of the organization
--cycle <CYCLE>
Election cycle
--coverage-before <COVERAGE_BEFORE>
Only filings that cover dates before this date
--coverage-after <COVERAGE_AFTER>
Only filings that cover dates after this date
--coverage-between <COVERAGE_BETWEEN> <COVERAGE_BETWEEN>
Only filings container coverage between these dates
--election <ELECTION>
--state <STATE>
--district <DISTRICT>
--office <OFFICE>
--bulk-daily-between <BULK_DAILY_BETWEEN> <BULK_DAILY_BETWEEN>
--api-key <API_KEY>
API key to use for OpenFEC API requests. If not provided, the DEMO_KEY will be used.
Global options:
--cache-directory <CACHE_DIRECTORY> [env: LIBFEC_CACHE_DIRECTORY=]
libfec fastfec
bash
FastFEC compatible export
Usage: libfec fastfec [OPTIONS] <FILING_ID> [OUTPUT_DIRECTORY]
Arguments:
<FILING_ID> FEC filing id OR path to a .fec file
[OUTPUT_DIRECTORY] Output directory [default: output]
Options:
-h, --help Print help
Global options:
--cache-directory <CACHE_DIRECTORY> [env: LIBFEC_CACHE_DIRECTORY=]
libfec info
bash
Print debug information about a FEC filing, committee, or candidate
Usage: libfec info [OPTIONS] [FILINGS]...
Arguments:
[FILINGS]...
Options:
-i, --input-file <INPUT_FILE> .txt files of FEC filing IDs to fetch, 1 line per filing ID
-f, --format <FORMAT> Format to output information to [default: human] [possible values: human, json]
--full Calculate stats on all itemizations in the provided filings
-h, --help Print help
Global options:
--cache-directory <CACHE_DIRECTORY> [env: LIBFEC_CACHE_DIRECTORY=]