Python package bytesbufio
bytesbufio provides BytesBufferIO - an io.BytesIO implementation whose value can be accessed after it has been closed
Installation
pip install bytesbufio
Usage
import io
from bytesbufio import BytesBufferIO
bytesbuf = BytesBufferIO()
with io.TextIOWrapper(bytesbuf, encoding='utf-8') as textout:
textout.write("Hello world.")
text = bytesbuf.getvalue().decode('utf-8') # BytesIO would have raised an ValueError here
print(text)
Related
- Python Issue 22003 - BytesIO and shared bufferes
- Python Issue 23099 - value not available after close
License
Copyright (c) 2020 by Cornelius Buschka.
Metadata
Release files for bytesbufio 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bytesbufio-1.0.3.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bytesbufio-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / bytesbufio-1.0.3.tar.gz
| Download URL | bytesbufio-1.0.3.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2cb1986e7c7a57cb7c204196a20178f381676503cd984786789a77e351bd62d
|
|
BLAKE2b-256 checksum How to use checksums |
63469b8a5d4df43b559072af6e7bfd56b51c018eca9818f77eb72925ea530621
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / bytesbufio-1.0.3-py3-none-any.whl
| Download URL | bytesbufio-1.0.3-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4063ff349b28bdc1458f425cf47597de06d01dbbbc6a3687271b4b7b1fe38eb
|
|
BLAKE2b-256 checksum How to use checksums |
83fb954032f95ddefd56200be4d26d9dacb553628379fdb042b775bfd00a8a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|