Skip to main content

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

Metadata

Release files for serp-base64 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for serp-base64 0.1.0
File Size Uploaded
serp_base64-0.1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for serp-base64 0.1.0
File Interpreter ABI Platform
serp_base64-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / serp_base64-0.1.0.tar.gz

Download URL serp_base64-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
873c8866b6057797048d469226057b6e1161ec4016c2824a651639a4512c9bf4
BLAKE2b-256 checksum
How to use checksums
d2461105c10dcd14d30a04a0b6262d4a5de918742fee95824fa0b0e8b74733cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / serp_base64-0.1.0-py3-none-any.whl

Download URL serp_base64-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
410ad02da8a652fb71241d8a5485ba959764f772b544fbad249bfb6a36a195b5
BLAKE2b-256 checksum
How to use checksums
5dcb58dd1fb24052181d1843d7981d46ffcabba446a7414306a4201c9338e2ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page