rustyssim
A high-performance IATA SSIM (Standard Schedules Information Manual) parser for Rust. Parses SSIM files into Polars DataFrames or exports directly to CSV/Parquet formats.
Features
- 🚀 Fast Performance: Built in Rust with parallel processing via Rayon
- 💾 Memory Efficient: Configurable batch processing for large SSIM files
- 📊 Multiple Output Formats: In-memory DataFrames, CSV, and Parquet
- 🗜️ Flexible Compression: Parquet compression options (zstd, lz4, snappy, etc.)
- 📦 Polars Re-exported: Use
rustyssim::polarswithout adding a separate dependency
Installation
Add to your Cargo.toml:
[]
= "0.6.0"
If you need additional Polars features (e.g., csv, sql), add it alongside:
[]
= "0.6.0"
= { = "0.53.0", = ["csv", "sql"] }
Polars Re-export
rustyssim re-exports Polars so you can work with the returned DataFrames without adding a separate dependency or worrying about version compatibility:
Quick Start
use ssim_to_dataframe;
use *;
API
Parse to a Single DataFrame
Returns a single dataframe with carriers (type 2), flights (type 3), and segments (type 4) combine under one. If you set condense_segments to True, it will aggregate segments into a JSON string column (smaller output). If false (default), each segment is a separate row.
use ssim_to_dataframe;
// All optional parameters accept None for defaults
let df = ssim_to_dataframe.expect;
Split by Record Type
Returns three DataFrames: carriers (type 2), flights (type 3), and segments (type 4).
use ssim_to_dataframes;
let = ssim_to_dataframes.expect;
println!;
Export to CSV
Writes and appends to single CSV file.
use ssim_to_csv;
ssim_to_csv.expect;
Export to Parquet (One File Per Carrier)
use ssim_to_parquets;
ssim_to_parquets.expect;
Performance Tuning
| Parameter | Default | Description |
|---|---|---|
batch_size |
10,000 | Records per processing batch. Increase for throughput, decrease for memory |
buffer_size |
8,192 (8 KB) | File read buffer. Use 131072 (128 KB) for large files |
condense_segments |
false | Aggregate segment records into a JSON column, reducing row count |
Data Structure
The parser handles three SSIM record types per IATA standards:
| Record | Type | Contents |
|---|---|---|
| Carrier | 2 | Airline metadata |
| Flight Leg | 3 | Core flight information (route, times, aircraft) |
| Segment | 4 | Segment-level details (DEI codes, data elements) |
Other Interfaces
This parser is also available as:
- Python:
pip install rustyssim - CLI: cli-rusty-ssim
Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Run the test suite (
cargo test -p rustyssim) - Submit a pull request
Community & Support
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
License
MIT — see LICENSE for details.