{"library":"overpunch","title":"Overpunch Parser/Formatter","description":"A library for parsing and formatting IBM mainframe overpunch (signed numeric) fields. Used to convert between human-readable numbers and the compact byte-level representations common in legacy COBOL systems. Current version 1.1, stable and rarely updated.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install overpunch"],"cli":null},"imports":["from overpunch import OverpunchParser","from overpunch import OverpunchFormatter"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from overpunch import OverpunchParser, OverpunchFormatter\n\n# Parse an overpunch byte string (last nibble holds sign)\nraw = b'\\x12\\x3d'  # Example: two bytes, last nibble 'D' (negative)\nparser = OverpunchParser()\nresult = parser.parse(raw)\nprint(result)  # -123\n\n# Format a number to overpunch bytes\nformatter = OverpunchFormatter()\nformatted = formatter.format(456)\nprint(formatted)  # b'\\x45\\x6c' (positive)\n","lang":"python","description":"Parse overpunch bytes to int and format int to bytes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}