Skip to main content

Fixed-width file parser for legacy logistics & supply chain data

Project description

FixedWidth Forge

PyPI version PyPI - Python Version GitHub

Parse legacy fixed-width files from logistics, warehouses, ERP systems, and mainframes — instantly.

Turn messy carrier reports, shipment manifests, and COBOL exports into clean CSV or JSON with a simple YAML schema.

Why Logistics & Supply Chain?

Legacy formats like fixed-width flat files, EDI, and proprietary mainframes are the glue of the supply chain. fwforge provides the bridge to modern data pipelines without the enterprise bloat.

Features

  • Schema-Driven: Define column layouts in YAML. Supports start+length or start+end positions.
  • Ultra-Fast: Built on Python principles for rapid parsing of multi-gigabyte flat files.
  • Batch Processing: Process entire directories of manifest exports with one command.
  • Inference Engine: Use --infer to automatically generate a baseline schema from a sample data file.
  • Clean Output: Transform legacy data to clean CSV or JSON with built-in type casting.

Installation (Free / Open Source)

pip install fwforge

Install from source (latest dev):

pip install git+https://github.com/Devotall/fwforge.git

Looking for the commercial Pro binary?
See fwforge-pro/ for the standalone high-performance version with multi-threading, audit logs, and enterprise features. One-time purchase or annual license (no PyPI, no subscriptions for the binary itself).

Quick Start

1. Infer a schema

Start from scratch with a sample file:

fwforge --infer -i data.txt > my-layout.yaml

2. Parse data

Convert legacy data to CSV (using the included sample):

fwforge -i data.txt -s layout.yaml -f csv -o output.csv
cat output.csv

3. Batch process a folder

fwforge -i ./daily_manifests/ -s manifest.yaml -f json

VS Code Extension (Alpha)

Preview legacy mainframe data as interactive tables directly in VS Code.

  • Located in: vscode-extension/
  • Supports context-menu "FW Forge: Preview as Table" for .txt and .fwf files (and similar).
  • Visualizes raw mainframe output using your custom YAML schemas.
  • Requires the fwforge CLI in PATH (configurable via fwforge.cliPath setting).
  • Funnel for Pro: Automatically detects files >50MB and offers an upgrade prompt to the high-speed Pro binary.

Installation

cd fwforge/vscode-extension
npm install -g @vscode/vsce
vsce package
code --install-extension fixedwidth-forge-0.1.0.vsix

The extension runs the CLI to parse and renders a clean HTML table in a webview.

Free vs Pro

  • Free (PyPI + open source): pip install fwforge. Great for most users.
  • Pro (commercial binary): Standalone fwforge-pro with multi-threading, auto-repair, audit logs, and pre-built schemas. See fwforge-pro/ and the landing page.

This follows an "invisible sales" model: the extension and docs do the selling for power users who hit real scale.

Invisible Sales / Long-Tail Strategy

  • Document specific formats: "How to parse SAP fixed-width to CSV", "AS/400 flat file parsing", etc. (add pages to GitHub Wiki or /docs).
  • List supported formats in the VS Code Marketplace description.
  • Answer GitHub issues in related logistics/EDI projects with links to fwforge.

Example Schema (layout.yaml)

name: "Freight-Manifest-v1"
columns:
  - name: "carrier_code"
    start: 0
    length: 5
    trim: true
    type: "string"
  - name: "weight"
    start: 20
    length: 10
    trim: true
    type: "float"

Development

git clone https://github.com/Devotall/fwforge.git
cd fwforge
uv sync
uv run pytest -v

# Run the CLI
uv run fwforge --help

Roadmap

  • More robust type casting (dates, currency, custom)
  • Schema validation + strict mode
  • Better inference (header detection, multi-line records)
  • Performance / memory improvements for GB+ files
  • Standalone binary releases
  • Expanded output formats (parquet, etc.)

Changelog

See CHANGELOG.md for release notes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fwforge-0.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fwforge-0.1.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file fwforge-0.1.2.tar.gz.

File metadata

  • Download URL: fwforge-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fwforge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 779ecd29d04f4cd41c569f7d35effd62b0193fdc1adffe23a0fec920fab04c10
MD5 df046e1d580d4beff21a68ee0d85cadb
BLAKE2b-256 00f1fdb10ce1a7909a3e49301a7aa09cb1aa85b6c96525f85474b8625fea1009

See more details on using hashes here.

File details

Details for the file fwforge-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fwforge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fwforge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fbf8e52eb5e3a26fc47ad47df10e37686df386b9ca1455b75842e327778079c3
MD5 36478c3a3102505eb5bb9ea840882abb
BLAKE2b-256 febf0477763fe375e62ab5498cf99285cbb19aaa310102508eb28bb9e40a09ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page