--- id: fixedwidth version: "1.3" license: BSD license_treatment: permissive maintenance: aging --- # FixedWidth — Two-way fixed-width <--> Python dict converter. License: permissive · Maintenance: aging · Downloads: 1.1M/mo ## What it is and what it does FixedWidth is a Python library for bidirectional conversion between fixed-width text records and Python dictionaries. It uses a configuration dictionary to define field positions, types, alignment, and padding, then parses fixed-width strings into dicts or serializes dicts back to fixed-width format. The library supports string, integer, and decimal types, with configurable date formatting and decimal precision. The package has a minimal dependency footprint (only six) and low install friction. It was designed for production use and has reportedly run unchanged for several years. However, maintenance is aging—the latest release dates to 2018, and there is no recent activity. The library's main value lies in handling legacy fixed-width data formats, which remain common in certain data integration scenarios. Use it for: - Parse fixed-width records into Python dicts for processing or database import - Generate fixed-width output files for systems that require strict positional field formatting - Debug and validate fixed-width file specifications by catching configuration errors early - Convert between fixed-width flat-file formats and in-memory Python data structures - Integrate fixed-width data pipelines in batch processing workflows ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts between Python dictionaries and fixed-width text files in both directions, with configuration-driven field parsing and validation. Yes, if you need to work with fixed-width files. The package is lightweight, permissively licensed, and has proven stable in production. However, be aware that maintenance is aging (last release 2018) and Python version support is unspecified—test compatibility with your target Python version before relying on it in new projects. ## Install pip install fixedwidth uv add fixedwidth poetry add fixedwidth ## Installing FixedWidth Before you install: Low install friction with a single lightweight dependency (six). Maintenance is aging—last release was in 2018 and the repository has not been updated since 2025-04-22, though it remains unarchived and the package has been in production use for several years without modification. License in practice: BSD permissive license places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install FixedWidth from fixedwidth import FixedWidth config = { 'name': {'type': 'string', 'start_pos': 1, 'end_pos': 10, 'alignment': 'left', 'padding': ' '} } fw = FixedWidth(config) record_dict = fw.parse(fixed_width_line) fixed_width_line = fw.to_fixed_width(record_dict) Verify before relying: - Whether the package works with modern Python versions beyond those it was originally tested against - Whether the repository's last commit date (2025-04-22) indicates active maintenance or is a stale timestamp - Current compatibility with six and whether six remains actively maintained ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags fixed-width file parser, fixed width text conversion, dict to fixed-width, fixed-width format handler, parse fixed-width records, fixed-width data extraction, legacy-data-format, file-parsing, etl [View on SkillFed](https://skillfed.io/packages/fixedwidth) · [View on PyPI](https://pypi.org/project/fixedwidth/)