ebcdic
Additional EBCDIC codecs
What it is and what it does
ebcdic extends Python's built-in codec system with a comprehensive set of EBCDIC character encodings used on mainframe computers. It registers codecs for regional variants (e.g., cp1141 for German-speaking countries, cp1140 for USA/Australia/Canada) and legacy variants without Euro sign support, allowing Python code to transparently encode Unicode strings to EBCDIC byte sequences and decode EBCDIC bytes back to Unicode.
The package is designed specifically for data exchange scenarios where legacy mainframe systems require EBCDIC encoding. It has no runtime dependencies and works as a drop-in import: once imported, the codecs become available to Python's standard encode/decode methods. The package is actively maintained, supports current Python versions (3.9–3.14), and carries no known security vulnerabilities.
Use it for:
- Exchange data with mainframe systems in German-speaking countries using cp1141 encoding.
- Convert legacy EBCDIC-encoded files from Eastern European systems (cp870) to Unicode for modern processing.
- Build data pipelines that read EBCDIC records from mainframe databases and write them as UTF-8 JSON or CSV.
- Migrate batch processing jobs from mainframes to Python by decoding EBCDIC input streams.
- Support multi-regional mainframe integrations by selecting the appropriate regional codec (cp1142, cp1143, cp1144, etc.).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Registers additional EBCDIC character encoding codecs for Python, enabling encode/decode operations with legacy mainframe systems that use EBCDIC character sets.
Yes, if you work with legacy mainframe systems that use EBCDIC. The package is lightweight, actively maintained, has no dependencies, carries no security vulnerabilities, and is the standard way to handle EBCDIC codecs in Python. Not worth installing if you have no mainframe integration needs.
Install
ebcdic on PyPI
pip
pip install ebcdicuv
uv add ebcdicpoetry
poetry add ebcdicInstalling ebcdic
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and stable status across modern Python versions (3.9–3.14).
License in practice
BSD-2-Clause is permissive; you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install ebcdic
import ebcdic
encoded = 'hello world'.encode('cp1141')
print(encoded)
Requires Python 3.9 or later; for Python 2.7 or 3.4–3.8, use version 1.1.1 instead.
Verify before relying
- Whether all listed codecs (cp290, cp420, cp424, etc.) are fully tested and production-ready beyond the 'Production/Stable' classifier.
- Performance characteristics when encoding/decoding large volumes of EBCDIC data.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 164 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,488,818/month — #1,737 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ebcdic-2.0.1-py3-none-any.whl
Keywords: codec, text, unicode, ebcdic
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
mikeshardmind-base2048Encodes binary data into text using base2048, a…
copyleft · top 15,000 on PyPI
numcodecsNumcodecs provides buffer compression and…
permissive · top 5,000 on PyPI
overpunchParses and formats overpunch-encoded numbers, a…
permissive · top 15,000 on PyPI
rtfunicodeEncodes Unicode strings to RTF 1.5 command…
permissive · top 15,000 on PyPI
UnidecodeConverts Unicode text to ASCII-safe…
copyleft · top 1,000 on PyPI
pylzsspylzss decodes and encodes data compressed with…
copyleft · top 15,000 on PyPI
base2048Encodes and decodes binary data using Base2048,…
permissive · top 15,000 on PyPI
py-multibaseEncodes and decodes data using the Multibase…
permissive · top 15,000 on PyPI
latexcodecProvides a Python codec to convert between…
permissive · top 5,000 on PyPI
copybookCopybook parses VSAM copybook definitions and…
permissive · top 15,000 on PyPI