Input a base64 string and return BytesIO
Project description
base64_bytesio
This library provides functionality to decode base64 encoded files and return them as BytesIO objects.
Scenario
When your website using base64 as image format. And front-end will upload some images to your django back-end. In django framework mostly using file object to recieve image. In this moment, you may need to convert base64 to a bytes io object. Meantime, In our scenario I don't need to save my file on server. Just upload AWS s3 bucket that will fine.
Installation
You can install the library via pip:
pip install base64_bytesio
Usages
Example of using the library
from base64_bytesio import Base64BytesIO
data = "data:image/jpeg;base64,..."
decoder = Base64BytesIO()
file_object, filename = decoder.decode(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file base64_bytesio-0.0.1.tar.gz.
File metadata
- Download URL: base64_bytesio-0.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77214e1a950b4df2113565bef1dac70cd578bf5461829846ef9e02495b9cf0ef
|
|
| MD5 |
3f7e3eadad72a7323ce4d6c46b34de71
|
|
| BLAKE2b-256 |
42dfd1a3b75ebb799fd227caa35cf9fe8e6fe00602aa4447e23a287be821272d
|
File details
Details for the file base64_bytesio-0.0.1-py3-none-any.whl.
File metadata
- Download URL: base64_bytesio-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57caad61794f759e26c0e09dafdcca0744d270c9a127f54dc408267c0a64288a
|
|
| MD5 |
1b4a027695e8945fd67fc382854b3f1c
|
|
| BLAKE2b-256 |
ecaaf9c1b682bd6b6c71f6d66ff05212cdc633406c815c98900f977eda9959e0
|