{"id":16917232,"url":"https://github.com/mayeut/pybase64","last_synced_at":"2025-05-15T07:03:37.913Z","repository":{"id":23380237,"uuid":"83081030","full_name":"mayeut/pybase64","owner":"mayeut","description":"Fast Base64 encoding/decoding in Python","archived":false,"fork":false,"pushed_at":"2025-05-12T18:42:49.000Z","size":934,"stargazers_count":152,"open_issues_count":3,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-15T07:02:26.024Z","etag":null,"topics":["base64","python","python-library","simd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mayeut.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-24T20:43:24.000Z","updated_at":"2025-05-10T05:47:11.000Z","dependencies_parsed_at":"2024-05-04T18:23:26.847Z","dependency_job_id":"1dd15eeb-8431-45bd-8920-b4f85f33f09d","html_url":"https://github.com/mayeut/pybase64","commit_stats":{"total_commits":800,"total_committers":9,"mean_commits":88.88888888888889,"dds":0.6212500000000001,"last_synced_commit":"ed311b9254c1ccbadb4decf3eda01477d51f9a34"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayeut%2Fpybase64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayeut%2Fpybase64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayeut%2Fpybase64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayeut%2Fpybase64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayeut","download_url":"https://codeload.github.com/mayeut/pybase64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254291961,"owners_count":22046424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base64","python","python-library","simd"],"created_at":"2024-10-13T19:33:55.375Z","updated_at":"2025-05-15T07:03:37.823Z","avatar_url":"https://github.com/mayeut.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. SETUP VARIABLES\n.. |license-status| image:: https://img.shields.io/badge/license-BSD%202--Clause-blue.svg\n  :target: https://github.com/mayeut/pybase64/blob/master/LICENSE\n.. |pypi-status| image:: https://img.shields.io/pypi/v/pybase64.svg\n  :target: https://pypi.python.org/pypi/pybase64\n.. |python-versions| image:: https://img.shields.io/pypi/pyversions/pybase64.svg\n.. |rtd-status| image:: https://readthedocs.org/projects/pybase64/badge/?version=stable\n  :target: http://pybase64.readthedocs.io/en/stable/?badge=stable\n  :alt: Documentation Status\n.. |gha-status| image:: https://github.com/mayeut/pybase64/workflows/Build%20and%20upload%20to%20PyPI/badge.svg\n  :target: https://github.com/mayeut/pybase64/actions?query=workflow%3A%22Build+and+upload+to+PyPI%22\n.. |codecov-status| image:: https://codecov.io/gh/mayeut/pybase64/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/mayeut/pybase64/branch/master\n.. END OF SETUP\n\nFast Base64 implementation\n==========================\n\n|license-status| |pypi-status| |python-versions| |rtd-status| |gha-status| |codecov-status|\n\nThis project is a wrapper on `libbase64 \u003chttps://github.com/aklomp/base64\u003e`_.\n\nIt aims to provide a fast base64 implementation for base64 encoding/decoding.\n\nInstallation\n============\n\n.. code::\n\n    pip install pybase64\n\nUsage\n=====\n\n``pybase64`` uses the same API as Python base64 \"modern interface\" (introduced in Python 2.4) for an easy integration.\n\nTo get the fastest decoding, it is recommended to use the ``pybase64.b64decode`` and ``validate=True`` when possible.\n\n.. code:: python\n\n    import pybase64\n\n    print(pybase64.b64encode(b'\u003e\u003e\u003efoo???', altchars='_:'))\n    # b'Pj4_Zm9vPz8:'\n    print(pybase64.b64decode(b'Pj4_Zm9vPz8:', altchars='_:', validate=True))\n    # b'\u003e\u003e\u003efoo???'\n\n    # Standard encoding helpers\n    print(pybase64.standard_b64encode(b'\u003e\u003e\u003efoo???'))\n    # b'Pj4+Zm9vPz8/'\n    print(pybase64.standard_b64decode(b'Pj4+Zm9vPz8/'))\n    # b'\u003e\u003e\u003efoo???'\n\n    # URL safe encoding helpers\n    print(pybase64.urlsafe_b64encode(b'\u003e\u003e\u003efoo???'))\n    # b'Pj4-Zm9vPz8_'\n    print(pybase64.urlsafe_b64decode(b'Pj4-Zm9vPz8_'))\n    # b'\u003e\u003e\u003efoo???'\n\n.. begin cli\n\nA command-line tool is also provided. It has encode, decode and benchmark subcommands.\n\n.. code::\n\n    usage: pybase64 [-h] [-V] {benchmark,encode,decode} ...\n\n    pybase64 command-line tool.\n\n    positional arguments:\n      {benchmark,encode,decode}\n                            tool help\n        benchmark           -h for usage\n        encode              -h for usage\n        decode              -h for usage\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -V, --version         show program's version number and exit\n\n.. end cli\n\nFull documentation on `Read the Docs \u003chttp://pybase64.readthedocs.io/en/stable/?badge=stable\u003e`_.\n\nBenchmark\n=========\n\n.. begin benchmark\n\nRunning Python 3.7.2, Apple LLVM version 10.0.0 (clang-1000.11.45.5), Mac OS X 10.14.2 on an Intel Core i7-4870HQ @ 2.50GHz\n\n.. code::\n\n    pybase64 0.5.0 (C extension active - AVX2)\n    bench: altchars=None, validate=False\n    pybase64._pybase64.encodebytes:   1734.776 MB/s (13,271,472 bytes -\u003e 17,928,129 bytes)\n    pybase64._pybase64.b64encode:     4039.539 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    pybase64._pybase64.b64decode:     1854.423 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    base64.encodebytes:                 78.352 MB/s (13,271,472 bytes -\u003e 17,928,129 bytes)\n    base64.b64encode:                  539.840 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    base64.b64decode:                  287.826 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    bench: altchars=None, validate=True\n    pybase64._pybase64.b64encode:     4156.607 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    pybase64._pybase64.b64decode:     4107.997 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    base64.b64encode:                  559.342 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    base64.b64decode:                  143.674 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    bench: altchars=b'-_', validate=False\n    pybase64._pybase64.b64encode:     2786.776 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    pybase64._pybase64.b64decode:     1124.136 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    base64.b64encode:                  322.427 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    base64.b64decode:                  205.195 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    bench: altchars=b'-_', validate=True\n    pybase64._pybase64.b64encode:     2806.271 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    pybase64._pybase64.b64decode:     2740.456 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n    base64.b64encode:                  314.709 MB/s (13,271,472 bytes -\u003e 17,695,296 bytes)\n    base64.b64decode:                  121.803 MB/s (17,695,296 bytes -\u003e 13,271,472 bytes)\n\n.. end benchmark\n\n.. begin changelog\n\nChangelog\n=========\n1.4.1\n-----\n- Publish PyPy 3.11 wheels\n- Publish armv7l wheels\n\n1.4.0\n-----\n- Publish python 3.13 wheels\n- Add support for free-threaded builds\n- Add MSYS2 support for C-extension\n- Better logging on base64 build failure when C-extension build is optional\n- Drop python 3.6 \u0026 3.7 support\n\n1.3.2\n-----\n- Update base64 library\n- PyPy: fix wrong outcome with non C-contiguous buffer\n\n1.3.1\n-----\n- Add missing py.typed marker\n\n1.3.0\n-----\n- Update base64 library\n- Add AVX512-VBMI implementation\n- Rework extension build to remove adherence on distutils\n- Publish python 3.12 wheels\n- Documentation now uses furo theme\n\n1.2.3\n-----\n- Update base64 library\n- Publish python 3.11 wheels\n\n1.2.2\n-----\n- Update base64 library\n- Fix C extension build on musl distros\n- Publish musllinux wheels\n\n1.2.1\n-----\n- Publish PyPy 3.8 (pypy38_pp73) wheels\n\n1.2.0\n-----\n- Release the GIL\n- Publish CPython 3.10 wheels\n- Drop python 3.5 support\n\n1.1.4\n-----\n- Add macOS arm64 wheel\n\n1.1.3\n-----\n- GitHub Actions: fix build on tag\n\n1.1.2\n-----\n- Add PyPy wheels\n- Add aarch64, ppc64le \u0026 s390x manylinux wheels\n\n1.1.1\n-----\n- Move CI from TravisCI/AppVeyor to GitHub Actions\n- Fix publication of Linux/macOS wheels\n\n1.1.0\n-----\n- Add b64encode_as_string, same as b64encode but returns a str object instead of a bytes object\n- Add b64decode_as_bytearray, same as b64decode but returns a bytarray object instead of a bytes object\n- Speed-Up decoding from UCS1 strings\n\n1.0.2\n-----\n- Update base64 library\n- Publish python 3.9 wheels\n\n1.0.1\n-----\n- Publish python 3.8 wheels\n\n1.0.0\n-----\n- Drop python 3.4 support\n- Drop python 2.7 support\n\n0.5.0\n-----\n- Publish python 3.7 wheels\n- Drop python 3.3 support\n\n0.4.0\n-----\n- Speed-up decoding when validate==False\n\n0.3.1\n-----\n- Fix deployment issues\n\n0.3.0\n-----\n- Add encodebytes function\n\n0.2.1\n-----\n- Fixed invalid results on Windows\n\n0.2.0\n-----\n- Added documentation\n- Added subcommands to the main script:\n\n    * help\n    * version\n    * encode\n    * decode\n    * benchmark\n\n0.1.2\n-----\n- Updated base64 native library\n\n0.1.1\n-----\n- Fixed deployment issues\n\n0.1.0\n-----\n- First public release\n\n.. end changelog\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayeut%2Fpybase64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayeut%2Fpybase64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayeut%2Fpybase64/lists"}