5 releases (breaking)
0.5.0 | Aug 18, 2023 |
---|---|
0.4.0 | Jun 9, 2023 |
0.3.0 | Jun 6, 2023 |
0.2.0 | May 26, 2023 |
0.1.0 | May 24, 2023 |
#11 in #fec
51 downloads per month
54KB
1K
SLoC
FECo3
A Rust library for parsing .FEC files.
This crate holds the core parsing logic. It is intended to be extended.
For example, we have Python bindings. You could add a bindings for other languages if you wanted, or you could customize the parsing at the rust level, for example adding a new input reader or output writer.
Documentation is available at docs.rs/feco3.
Rust Usage
Add this to your Cargo.toml
:
[dependencies]
feco3 = "VERSION"
Then:
fn main() {
let fec = feco3::FecFile::from_path("path/to/file.fec")
println!("{:?}", fec);
}
lib.rs
:
FECo3 is a library for parsing .fec files from the US Federal Election Commission.
.fec files are binary files that contain campaign finance data. This library provides an efficient, flexible, stream-oriented parser for these files.
The parser takes a byte stream as input, which makes it flexible enough to parse files from a variety of sources, including local files, HTTP streams, or a custom source.
FECo3 includes a framework for writing the parsed data. Currently, writing to a directory of .csvs or .parquet files are built in, but the framework is designed to be extensible to other formats.
There are bindings for python available on the repo.
Dependencies
~45MB
~866K SLoC