HttpClientMultipart
Description
This package implement client to upload file using HTTP multipart.
Requirements
This package require :
- python3
- python3 Standard Library
Installation
pip install HttpClientMultipart
Usages
Command line
HttpMultipart -h # Print help message
HttpMultipart --help # Print help message
HttpMultipart -u "http://example.com/post/file"
python3 -m HttpMultipart --url "http://example.com/post/file" # Using module command line
python3 HttpMultipart.pyz -H "Referer:http://example.com/" "Cookie:S=123" -u "http://example.com/post/file" # Using python executable file, add headers
HttpMultipart --add-headers "Referer:http://example.com/" "Cookie:S=123" -u "http://example.com/post/file" # Add headers
HttpMultipart -p "submit:Upload" -u "http://example.com/post/file" # Add simple field
HttpMultipart --add-parameters "submit:Upload" -u "http://example.com/post/file" # Add simple field
HttpMultipart -f "/home/user/test.csv" -u "http://example.com/post/file" # Add file
HttpMultipart --files-path "/home/user/test.csv" -u "http://example.com/post/file" # Add file
Python script
from HttpClientMultipart import Multipart
from urllib.request import Request, urlopen
multipart = Multipart()
response = urlopen(
Request("http://example.com/post/file",
headers={'Content-Type': multipart.content_type},
data=multipart.build_multipart([("SubmitButton", "Upload file")], [("file", "test.csv", "/home/user/test.csv")]),
)
)
print(response.read())
Links
License
Licensed under the GPL, version 3.
Metadata
Release files for HttpClientMultipart 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| HttpClientMultipart-0.0.1.tar.gz | 17.5 kB | Without provenance | Details for HttpClientMultipart-0.0.1.tar.gz |
Release files / HttpClientMultipart-0.0.1.tar.gz
| Download URL | HttpClientMultipart-0.0.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2692a256332f664d2e18f72bf89d1f15f6327c30cf7dc6d4cc94a1b144674d29
|
|
BLAKE2b-256 checksum How to use checksums |
e6c6ccb4946dafd0d02e0426e925527612eafb089417b9592b981ab07ff5fba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
|
Security for HttpClientMultipart 0.0.1
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.