aws / aws/base64io-python

Feature Request: Add support for altchars

Aperta
#40 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
42
Fork
29
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

First, thanks for a cool package!

The core function that this package turns into a streaming interface is `base64.b64encode(s, altchars=None)`, and that function supports alternate characters for `+` and `/`:

> Optional altchars must be a bytes-like object of at least length 2 (additional characters are ignored) which specifies an alternative alphabet for the + and / characters. This allows an application to e.g. generate URL or filesystem safe Base64 strings. The default is None, for which the standard Base64 alphabet is used.

Seems like it would be fairly simple to support alt chars in this package by adding a new, optional parameter to the `Base64IO` constructor.

Happy to make a PR to add the feature if it's something the maintainers would want.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.