Metadata-Version: 2.1
Name: b64s
Version: 0.1.0
Summary: Base64 with UTF-8 str input and output
Home-page: https://github.com/EliahKagan/b64s
License: CC0-1.0
Keywords: base64,decoding,encoding,text,utf-8
Author: Eliah Kagan
Author-email: degeneracypressure@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Project-URL: Repository, https://github.com/EliahKagan/b64s
Description-Content-Type: text/markdown

<!-- 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.

