Birman
Multipart formdata decoder library.
Install
pip install birman
Get started
Decode multipart form data
from birman import Decoder
# multipart_data = b'---- ...etc'
decoder = Decoder(multipart_data)
result = decoder.decode()
This would return a normalized dict
# example from params - ?email=test@test.com&password=wizard
# result -
{
"email": {
"name": "email",
"value": "test@test.com",
},
"password": {
"name": "password",
"value": "wizard",
},
}
Parse URI form params
from birman import Encoder
arg = "?email=test@test.com&password=wizard"
result = Encoder.parse_params(arg)
This would return a normalized dict
# result -
{
"email": {
"name": "email",
"value": "test@test.com",
},
"password": {
"name": "password",
"value": "wizard",
},
}
Multipart Formdata
The decoder method will return file data extracted from the multipart formdata as a dict.
{
'name': 'logo',
'type': 'file',
'value': {
'filename': 'bobtail.png',
'mimetype': 'image/png',
'file_data': b'...',
'type': 'file',
}
Release files for birman 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| birman-0.0.2.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| birman-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / birman-0.0.2.tar.gz
| Download URL | birman-0.0.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9b61576a4d8adde0eab5784b1c7f73de75d4dfef04b36f0913d82cca0d1e7d0
|
|
BLAKE2b-256 checksum How to use checksums |
6c0bbd4973a925a2b948cebd4776ef1b6ca58ddfb2dc18422e6b9276c219f5f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / birman-0.0.2-py3-none-any.whl
| Download URL | birman-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
277d94226f210c71ae02e0c97ab168ceff2b58fd41a49ae1437dab5f074545b6
|
|
BLAKE2b-256 checksum How to use checksums |
406342649fe1f0f40c695267366ffd41514e8798ab70e8e412fd7af1bb13dad6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|