Metadata-Version: 2.4
Name: serp-base64
Version: 0.1.0
Summary: Serpentine base64/base32/base16 codecs written in the Serpentine subset (str <-> str via UTF-8)
Author: Serpentine contributors
License: MIT
Project-URL: Homepage, https://github.com/avijitbhuin21/Serpentine
Keywords: serpentine,base64,encoding
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: serpentine-shim

# serp-base64

Drop-in replacement for CPython's `base64` module: bytes-in / bytes-out,
written in the Serpentine subset.

## API

- `b64encode(s, altchars=None)` / `b64decode(s, altchars=None, validate=False)`
- `standard_b64encode/decode`, `urlsafe_b64encode/decode`
- `b32encode(s)` / `b32decode(s, casefold=False)` — RFC 4648.
- `b16encode(s)` / `b16decode(s, casefold=False)` — uppercase hex.
- `utf8_bytes(s) -> list[int]` / `utf8_text(list[int]) -> str` — Serpentine
  extras kept for other libraries.

Divergences: decode errors raise `ValueError` (CPython raises
`binascii.Error`, a ValueError subclass); inputs must be bytes (CPython also
accepts ASCII str); a85/b85/b32hex variants are not provided.

## Install

```
serp add serp-base64
pip install serp-base64
```
