{
    "mode": "pydoc",
    "parameter": "binascii",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/binascii/json",
    "generated": "2026-06-15T11:40:47Z",
    "sections": {
        "NAME": {
            "content": "binascii - Conversion between binary data and ASCII\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nIncomplete\nbuiltins.ValueError(builtins.Exception)\nError\n",
            "subsections": [
                {
                    "name": "class Error",
                    "content": "|  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"
                },
                {
                    "name": "class Incomplete",
                    "content": "|  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"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "a2b_base64",
                    "content": "Decode a line of base64 data.\n"
                },
                {
                    "name": "a2b_hex",
                    "content": "Binary 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"
                },
                {
                    "name": "a2b_hqx",
                    "content": "Decode .hqx coding.\n"
                },
                {
                    "name": "a2b_qp",
                    "content": "Decode a string of qp-encoded data.\n"
                },
                {
                    "name": "a2b_uu",
                    "content": "Decode a line of uuencoded data.\n"
                },
                {
                    "name": "b2a_base64",
                    "content": "Base64-code line of data.\n"
                },
                {
                    "name": "b2a_hex",
                    "content": "Hexadecimal 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"
                },
                {
                    "name": "b2a_hqx",
                    "content": "Encode .hqx data.\n"
                },
                {
                    "name": "b2a_qp",
                    "content": "Encode 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"
                },
                {
                    "name": "b2a_uu",
                    "content": "Uuencode line of data.\n"
                },
                {
                    "name": "crc32",
                    "content": "Compute CRC-32 incrementally.\n"
                },
                {
                    "name": "crc_hqx",
                    "content": "Compute CRC-CCITT incrementally.\n"
                },
                {
                    "name": "hexlify",
                    "content": "Hexadecimal 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"
                },
                {
                    "name": "rlecode_hqx",
                    "content": "Binhex RLE-code binary data.\n"
                },
                {
                    "name": "rledecode_hqx",
                    "content": "Decode hexbin RLE-coded string.\n"
                },
                {
                    "name": "unhexlify",
                    "content": "Binary data of hexadecimal representation.\n\nhexstr must contain an even number of hex digits (upper or lower case).\n"
                }
            ]
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "binascii - Conversion between binary data and ASCII",
    "flags": [],
    "examples": [],
    "see_also": []
}