{"id":20292531,"url":"https://github.com/mauricelambert/httpclientmultipart","last_synced_at":"2025-03-04T05:13:43.602Z","repository":{"id":62569626,"uuid":"382937539","full_name":"mauricelambert/HttpClientMultipart","owner":"mauricelambert","description":"This package implement client to upload file using HTTP multipart","archived":false,"fork":false,"pushed_at":"2021-07-04T20:39:37.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T09:14:45.524Z","etag":null,"topics":["client","form-data","http","multipart","pypi-package","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauricelambert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-04T19:56:53.000Z","updated_at":"2021-07-04T20:39:39.000Z","dependencies_parsed_at":"2022-11-03T16:47:09.760Z","dependency_job_id":null,"html_url":"https://github.com/mauricelambert/HttpClientMultipart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FHttpClientMultipart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FHttpClientMultipart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FHttpClientMultipart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FHttpClientMultipart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauricelambert","download_url":"https://codeload.github.com/mauricelambert/HttpClientMultipart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787485,"owners_count":20020101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","form-data","http","multipart","pypi-package","python3"],"created_at":"2024-11-14T15:17:39.547Z","updated_at":"2025-03-04T05:13:43.577Z","avatar_url":"https://github.com/mauricelambert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HttpClientMultipart\r\n\r\n## Description\r\n\r\nThis package implement client to upload file using HTTP multipart.\r\n\r\n## Requirements\r\nThis package require :\r\n - python3\r\n - python3 Standard Library\r\n\r\n## Installation\r\n```bash\r\npip install HttpClientMultipart\r\n```\r\n\r\n## Usages\r\n\r\n### Command line\r\n\r\n```bash\r\nHttpMultipart -h                                                                                             # Print help message\r\nHttpMultipart --help                                                                                         # Print help message\r\nHttpMultipart -u \"http://example.com/post/file\"\r\npython3 -m HttpMultipart --url \"http://example.com/post/file\"                                                # Using module command line\r\npython3 HttpMultipart.pyz -H \"Referer:http://example.com/\" \"Cookie:S=123\" -u \"http://example.com/post/file\"  # Using python executable file, add headers\r\nHttpMultipart --add-headers \"Referer:http://example.com/\" \"Cookie:S=123\" -u \"http://example.com/post/file\"   # Add headers\r\nHttpMultipart -p \"submit:Upload\" -u \"http://example.com/post/file\"                                           # Add simple field\r\nHttpMultipart --add-parameters \"submit:Upload\" -u \"http://example.com/post/file\"                             # Add simple field\r\nHttpMultipart -f \"/home/user/test.csv\" -u \"http://example.com/post/file\"                                     # Add file\r\nHttpMultipart --files-path \"/home/user/test.csv\" -u \"http://example.com/post/file\"                           # Add file\r\n```\r\n\r\n### Python script\r\n\r\n```python\r\nfrom HttpClientMultipart import Multipart\r\nfrom urllib.request import Request, urlopen\r\n\r\nmultipart = Multipart()\r\n\r\nresponse = urlopen(\r\n    Request(\"http://example.com/post/file\",\r\n        headers={'Content-Type': multipart.content_type},\r\n        data=multipart.build_multipart([(\"SubmitButton\", \"Upload file\")], [(\"file\", \"test.csv\", \"/home/user/test.csv\")]),\r\n    )\r\n)\r\n\r\nprint(response.read())\r\n```\r\n\r\n## Links\r\n - [Pypi](https://pypi.org/project/HttpClientMultipart)\r\n - [Github](https://github.com/mauricelambert/HttpClientMultipart)\r\n - [Documentation](https://mauricelambert.github.io/info/python/code/HttpClientMultipart.html)\r\n - [Python executable](https://mauricelambert.github.io/info/python/code/HttpClientMultipart.pyz)\r\n\r\n## License\r\nLicensed under the [GPL, version 3](https://www.gnu.org/licenses/).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fhttpclientmultipart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricelambert%2Fhttpclientmultipart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fhttpclientmultipart/lists"}