copybook
python copybook parser
Decision gist · record as of 2026-08-14
Yes, if you need to parse VSAM copybooks and can tolerate an abandoned package. The MIT license is permissive, install friction is low, and there are no known vulnerabilities. However, do not expect maintenance, bug fixes, or support for new Python versions. Suitable for stable, low-change integration tasks; risky for production systems requiring ongoing support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with a single runtime dependency (pyparsing).
- However, the package is abandoned—no releases since 2022-09-15 and no commits since 2023-05-17—so expect no maintenance or bug fixes going forward.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution.
last release 2022-09-15 (1429 days) · last repo commit 2023-05-17 · 33 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 99,687 downloads/mo, #13,015 on PyPI
Alternatives
Verify before relying
import copybook
text = """
01 WORK-BOOK.
10 TAX-RATE PIC S9(13)V9(2)
SIGN LEADING SEPARATE.
"""
root = copybook.parse_string(text)
list_of_fields = root.flatten()
for field in list_of_fields:
if type(field)==copybook.Field:
str_field = line[field.start_pos:field.start_pos+field.get_total_length()]
print(f"{field.name}: {field.parse(str_field)}")- Whether the package handles all COBOL PIC clause variations encountered in production copybooks
- Compatibility with Python versions beyond 3.7, given the classifier but unspecified requires_python
- Performance characteristics on large copybooks or high-volume fixed-width file parsing
What it is and what it does
Copybook is a Python parser for VSAM copybook definitions—the schema format used in COBOL and mainframe systems to describe fixed-width record layouts. It reads copybook text (either from a file or string) and builds a tree of field and group objects, exposing metadata like column positions and field lengths. The main use case is extracting that structural information to parse actual fixed-width data files: you define the copybook once, flatten its field list, then use the start positions and lengths to slice and decode each line of raw data according to its PIC clause (numeric, character, signed, etc.).
The package depends only on pyparsing for tokenization and installs with low friction. It supports a range of numeric and character PIC notations, OCCURS and REDEFINES clauses, and groups. However, the project is no longer maintained—the last release was in September 2022 and the repository has seen no commits since May 2023—so it will not receive updates for new Python versions, bug fixes, or unsupported copybook features.
Use it for
- Parse legacy mainframe data exports in fixed-width format using their original COBOL copybook definitions.
- Extract field positions and data types from copybooks to automate ETL pipelines that consume VSAM or sequential files.
- Convert copybook metadata into column mappings for data analysis or database loading tools.
- Validate or document the structure of fixed-width files by comparing them against their copybook schema.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse VSAM copybooks and can tolerate an abandoned package.
The MIT license is permissive, install friction is low, and there are no known vulnerabilities. However, do not expect maintenance, bug fixes, or support for new Python versions. Suitable for stable, low-change integration tasks; risky for production systems requiring ongoing support.
Install
copybook on PyPI
Before you install
Installation is straightforward with a single runtime dependency (pyparsing). However, the package is abandoned—no releases since 2022-09-15 and no commits since 2023-05-17—so expect no maintenance or bug fixes going forward.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution.
Quickstart
import copybook
text = """
01 WORK-BOOK.
10 TAX-RATE PIC S9(13)V9(2)
SIGN LEADING SEPARATE.
"""
root = copybook.parse_string(text)
list_of_fields = root.flatten()
for field in list_of_fields:
if type(field)==copybook.Field:
str_field = line[field.start_pos:field.start_pos+field.get_total_length()]
print(f"{field.name}: {field.parse(str_field)}")
Verify before relying
- Whether the package handles all COBOL PIC clause variations encountered in production copybooks
- Compatibility with Python versions beyond 3.7, given the classifier but unspecified requires_python
- Performance characteristics on large copybooks or high-volume fixed-width file parsing
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepyparsing |
| Maintenance | Abandoned 1,429 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 99,687 / month, #13,015 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.7 |
Evidence: copybook-1.0.16-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “VSAM copybook parser”
- copybookCopybook parses VSAM copybook definitions and extracts field…
- ArpeggioArpeggio is a recursive descent parser with memoization that…
- parsyParsy is a parser combinator library that lets you build complex text…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also FixedWidth · overpunch · fixedint · xmlformatter · ebcdic · texttable · unicodecsv · wheel-filename · textract · bincopy