Skip to main content

b64s - Base64 with UTF-8 str input and output

The b64s module provides two simple functions, encode and decode, that thinly wrap functionality from the base64 module 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, a public domain dedication.

See COPYING for details.

Usage

You can install the PyPI package, or clone the repository.

>>> 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:

Acknowledgements

Thanks to Michael Kagan for help with one of the examples.

Metadata

Release files for b64s 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 b64s 0.1.0
File Size Uploaded Provenance
b64s-0.1.0.tar.gz 2.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.7 kB

Release files / b64s-0.1.0.tar.gz

Download URL b64s-0.1.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
87004f748199458063afdc60374666769154ba4a0f60a7a4a7a32c157d2acb49
BLAKE2b-256 checksum
How to use checksums
ebda91104d0e27f5de786b72f4bbaf46e11ad9fe9ce0ea590e26582b9fe86e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.11.2 Linux/5.15.90.1-microsoft-standard-WSL2

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

Download URL b64s-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18f88fce254239df692dff4e56611f0db3ff059e33295d6c5bb621b412708542
BLAKE2b-256 checksum
How to use checksums
5fe85992ec3a90e6687d44155b2f3dc8e1fe53f6b2ac6046c34c94ef30280ad5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.11.2 Linux/5.15.90.1-microsoft-standard-WSL2

Security for b64s 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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