b64s


Nameb64s JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/EliahKagan/b64s
SummaryBase64 with UTF-8 str input and output
upload_time2023-03-20 18:01:35
maintainer
docs_urlNone
authorEliah Kagan
requires_python>=3.7,<4.0
licenseCC0-1.0
keywords base64 decoding encoding text utf-8
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- SPDX-License-Identifier: CC0-1.0 -->

# b64s - Base64 with UTF-8 str input and output

The [`b64s`
module](https://github.com/EliahKagan/b64s/blob/main/b64s/__init__.py) provides
two simple functions, `encode` and `decode`, that thinly wrap functionality
from the [`base64` module](https://docs.python.org/3/library/base64.html) in
the standard library, so that:

- All arguments and return values are `str`.
- UTF-8 encoding is assumed and used.

## License

This software is public domain. It is released under [CC0 1.0
Universal](https://creativecommons.org/publicdomain/zero/1.0/), a public domain
dedication.

See [**`COPYING`**](https://github.com/EliahKagan/b64s/blob/main/COPYING) for
details.

## Usage

You can install [the PyPI package](https://pypi.org/project/b64s/), or [clone
the repository](https://github.com/EliahKagan/b64s).

```python
>>> import b64s

>>> b64s.encode('The Hebrew phrase for “snowboarder” is גולש סנובורד. 🏂')
'VGhlIEhlYnJldyBwaHJhc2UgZm9yIOKAnHNub3dib2FyZGVy4oCdIGlzINeS15XXnNepINeh16DXldeR15XXqNeTLiDwn4+C'

>>> b64s.decode('VGhlIEhlYnJldyBwaHJhc2UgZm9yIOKAnHNub3dib2FyZGVy4oCdIGlzINeS15XXnNepINeh16DXldeR15XXqNeTLiDwn4+C')
'The Hebrew phrase for “snowboarder” is גולש סנובורד. 🏂'
```

## What’s here

The interesting files are:

- [`b64s/__init__.py`](https://github.com/EliahKagan/b64s/blob/main/b64s/__init__.py)
  – `encode` and `decode` functions.
- [`test_b64s.py`](https://github.com/EliahKagan/b64s/blob/main/test_b64s.py) –
  Unit tests.
- [`scratchpad.ipynb`](https://github.com/EliahKagan/b64s/blob/main/scratchpad.ipynb)
  – Notebook for trying things out.

## Acknowledgements

Thanks to [Michael Kagan](https://web.lemoyne.edu/~kagan/index.html) for help
with one of the examples.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EliahKagan/b64s",
    "name": "b64s",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "base64,decoding,encoding,text,utf-8",
    "author": "Eliah Kagan",
    "author_email": "degeneracypressure@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/da/91104d0e27f5de786b72f4bbaf46e11ad9fe9ce0ea590e26582b9fe86e74/b64s-0.1.0.tar.gz",
    "platform": null,
    "description": "<!-- SPDX-License-Identifier: CC0-1.0 -->\n\n# b64s - Base64 with UTF-8 str input and output\n\nThe [`b64s`\nmodule](https://github.com/EliahKagan/b64s/blob/main/b64s/__init__.py) provides\ntwo simple functions, `encode` and `decode`, that thinly wrap functionality\nfrom the [`base64` module](https://docs.python.org/3/library/base64.html) in\nthe standard library, so that:\n\n- All arguments and return values are `str`.\n- UTF-8 encoding is assumed and used.\n\n## License\n\nThis software is public domain. It is released under [CC0 1.0\nUniversal](https://creativecommons.org/publicdomain/zero/1.0/), a public domain\ndedication.\n\nSee [**`COPYING`**](https://github.com/EliahKagan/b64s/blob/main/COPYING) for\ndetails.\n\n## Usage\n\nYou can install [the PyPI package](https://pypi.org/project/b64s/), or [clone\nthe repository](https://github.com/EliahKagan/b64s).\n\n```python\n>>> import b64s\n\n>>> b64s.encode('The Hebrew phrase for \u201csnowboarder\u201d is \u05d2\u05d5\u05dc\u05e9 \u05e1\u05e0\u05d5\u05d1\u05d5\u05e8\u05d3. \ud83c\udfc2')\n'VGhlIEhlYnJldyBwaHJhc2UgZm9yIOKAnHNub3dib2FyZGVy4oCdIGlzINeS15XXnNepINeh16DXldeR15XXqNeTLiDwn4+C'\n\n>>> b64s.decode('VGhlIEhlYnJldyBwaHJhc2UgZm9yIOKAnHNub3dib2FyZGVy4oCdIGlzINeS15XXnNepINeh16DXldeR15XXqNeTLiDwn4+C')\n'The Hebrew phrase for \u201csnowboarder\u201d is \u05d2\u05d5\u05dc\u05e9 \u05e1\u05e0\u05d5\u05d1\u05d5\u05e8\u05d3. \ud83c\udfc2'\n```\n\n## What\u2019s here\n\nThe interesting files are:\n\n- [`b64s/__init__.py`](https://github.com/EliahKagan/b64s/blob/main/b64s/__init__.py)\n  \u2013 `encode` and `decode` functions.\n- [`test_b64s.py`](https://github.com/EliahKagan/b64s/blob/main/test_b64s.py) \u2013\n  Unit tests.\n- [`scratchpad.ipynb`](https://github.com/EliahKagan/b64s/blob/main/scratchpad.ipynb)\n  \u2013 Notebook for trying things out.\n\n## Acknowledgements\n\nThanks to [Michael Kagan](https://web.lemoyne.edu/~kagan/index.html) for help\nwith one of the examples.\n",
    "bugtrack_url": null,
    "license": "CC0-1.0",
    "summary": "Base64 with UTF-8 str input and output",
    "version": "0.1.0",
    "split_keywords": [
        "base64",
        "decoding",
        "encoding",
        "text",
        "utf-8"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fe85992ec3a90e6687d44155b2f3dc8e1fe53f6b2ac6046c34c94ef30280ad5",
                "md5": "43f98fc57d77cb3842707e05bc24fb79",
                "sha256": "18f88fce254239df692dff4e56611f0db3ff059e33295d6c5bb621b412708542"
            },
            "downloads": -1,
            "filename": "b64s-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "43f98fc57d77cb3842707e05bc24fb79",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 5338,
            "upload_time": "2023-03-20T18:01:33",
            "upload_time_iso_8601": "2023-03-20T18:01:33.377658Z",
            "url": "https://files.pythonhosted.org/packages/5f/e8/5992ec3a90e6687d44155b2f3dc8e1fe53f6b2ac6046c34c94ef30280ad5/b64s-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebda91104d0e27f5de786b72f4bbaf46e11ad9fe9ce0ea590e26582b9fe86e74",
                "md5": "841226a64514a3f06cd9785f8ffcb4ab",
                "sha256": "87004f748199458063afdc60374666769154ba4a0f60a7a4a7a32c157d2acb49"
            },
            "downloads": -1,
            "filename": "b64s-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "841226a64514a3f06cd9785f8ffcb4ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 2314,
            "upload_time": "2023-03-20T18:01:35",
            "upload_time_iso_8601": "2023-03-20T18:01:35.486793Z",
            "url": "https://files.pythonhosted.org/packages/eb/da/91104d0e27f5de786b72f4bbaf46e11ad9fe9ce0ea590e26582b9fe86e74/b64s-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-20 18:01:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "EliahKagan",
    "github_project": "b64s",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "b64s"
}
        
Elapsed time: 0.04885s