skillfed

ebcdic

Additional EBCDIC codecs

ebcdic v2.0.1 7.5M downloads/30d#1,737 on PyPI7
Permissive license BSD-2-Clause Active released

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 ebcdic

uv

uv add ebcdic

poetry

poetry add ebcdic

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Text Processing

Tags

ebcdic codecmainframe character encodinglegacy system data exchangeebcdic encode decodecp1140 cp1141 codec
legacy-systemsmainframecharacter-encoding

More Text Processing packages