{
    "content": [
        {
            "type": "text",
            "text": "# binascii (pydoc)\n\n**Summary:** binascii - Conversion between binary data and ASCII\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **CLASSES** (5 lines) — 2 subsections\n  - class Error (68 lines)\n  - class Incomplete (67 lines)\n- **FUNCTIONS** (1 lines) — 16 subsections\n  - a2b_base64 (2 lines)\n  - a2b_hex (5 lines)\n  - a2b_hqx (2 lines)\n  - a2b_qp (2 lines)\n  - a2b_uu (2 lines)\n  - b2a_base64 (2 lines)\n  - b2a_hex (19 lines)\n  - b2a_hqx (2 lines)\n  - b2a_qp (6 lines)\n  - b2a_uu (2 lines)\n  - crc32 (2 lines)\n  - crc_hqx (2 lines)\n  - hexlify (11 lines)\n  - rlecode_hqx (2 lines)\n  - rledecode_hqx (2 lines)\n  - unhexlify (4 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nbinascii - Conversion between binary data and ASCII\n\n### CLASSES\n\nbuiltins.Exception(builtins.BaseException)\nIncomplete\nbuiltins.ValueError(builtins.Exception)\nError\n\n#### class Error\n\n|  Method resolution order:\n|      Error\n|      builtins.ValueError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.ValueError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.ValueError:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class Incomplete\n\n|  Method resolution order:\n|      Incomplete\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n### FUNCTIONS\n\n#### a2b_base64\n\nDecode a line of base64 data.\n\n#### a2b_hex\n\nBinary data of hexadecimal representation.\n\nhexstr must contain an even number of hex digits (upper or lower case).\nThis function is also available as \"unhexlify()\".\n\n#### a2b_hqx\n\nDecode .hqx coding.\n\n#### a2b_qp\n\nDecode a string of qp-encoded data.\n\n#### a2b_uu\n\nDecode a line of uuencoded data.\n\n#### b2a_base64\n\nBase64-code line of data.\n\n#### b2a_hex\n\nHexadecimal representation of binary data.\n\nsep\nAn optional single character or byte to separate hex bytes.\nbytespersep\nHow many bytes between separators.  Positive values count from the\nright, negative values count from the left.\n\nThe return value is a bytes object.  This function is also\navailable as \"hexlify()\".\n\nExample:\n>>> binascii.b2ahex(b'\\xb9\\x01\\xef')\nb'b901ef'\n>>> binascii.hexlify(b'\\xb9\\x01\\xef', ':')\nb'b9:01:ef'\n>>> binascii.b2ahex(b'\\xb9\\x01\\xef', b'', 2)\nb'b901ef'\n\n#### b2a_hqx\n\nEncode .hqx data.\n\n#### b2a_qp\n\nEncode a string using quoted-printable encoding.\n\nOn encoding, when istext is set, newlines are not encoded, and white\nspace at end of lines is.  When istext is not set, \\r and \\n (CR/LF)\nare both encoded.  When quotetabs is set, space and tabs are encoded.\n\n#### b2a_uu\n\nUuencode line of data.\n\n#### crc32\n\nCompute CRC-32 incrementally.\n\n#### crc_hqx\n\nCompute CRC-CCITT incrementally.\n\n#### hexlify\n\nHexadecimal representation of binary data.\n\nsep\nAn optional single character or byte to separate hex bytes.\nbytespersep\nHow many bytes between separators.  Positive values count from the\nright, negative values count from the left.\n\nThe return value is a bytes object.  This function is also\navailable as \"b2ahex()\".\n\n#### rlecode_hqx\n\nBinhex RLE-code binary data.\n\n#### rledecode_hqx\n\nDecode hexbin RLE-coded string.\n\n#### unhexlify\n\nBinary data of hexadecimal representation.\n\nhexstr must contain an even number of hex digits (upper or lower case).\n\n### FILE\n\n(built-in)\n\n"
        }
    ],
    "structuredContent": {
        "command": "binascii",
        "section": "",
        "mode": "pydoc",
        "summary": "binascii - Conversion between binary data and ASCII",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 5,
                "subsections": [
                    {
                        "name": "class Error",
                        "lines": 68
                    },
                    {
                        "name": "class Incomplete",
                        "lines": 67
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "a2b_base64",
                        "lines": 2
                    },
                    {
                        "name": "a2b_hex",
                        "lines": 5
                    },
                    {
                        "name": "a2b_hqx",
                        "lines": 2
                    },
                    {
                        "name": "a2b_qp",
                        "lines": 2
                    },
                    {
                        "name": "a2b_uu",
                        "lines": 2
                    },
                    {
                        "name": "b2a_base64",
                        "lines": 2
                    },
                    {
                        "name": "b2a_hex",
                        "lines": 19
                    },
                    {
                        "name": "b2a_hqx",
                        "lines": 2
                    },
                    {
                        "name": "b2a_qp",
                        "lines": 6
                    },
                    {
                        "name": "b2a_uu",
                        "lines": 2
                    },
                    {
                        "name": "crc32",
                        "lines": 2
                    },
                    {
                        "name": "crc_hqx",
                        "lines": 2
                    },
                    {
                        "name": "hexlify",
                        "lines": 11
                    },
                    {
                        "name": "rlecode_hqx",
                        "lines": 2
                    },
                    {
                        "name": "rledecode_hqx",
                        "lines": 2
                    },
                    {
                        "name": "unhexlify",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}