{"id":24085,"library":"multipart-reader","title":"multipart-reader","description":"A multipart/* reader extracted from the aiohttp project (version 0.2, 2018). Provides a simple API to parse multipart form data and file uploads. Low release cadence, last updated in 2018.","status":"maintenance","version":"0.2","language":"python","source_language":"en","source_url":"https://github.com/novafloss/multipart-reader","tags":["multipart","form-data","parsing","aiohttp"],"install":[{"cmd":"pip install multipart-reader","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"Correct module name uses underscores","wrong":"from multipart.reader import MultipartReader","symbol":"MultipartReader","correct":"from multipart_reader import MultipartReader"}],"quickstart":{"code":"from multipart_reader import MultipartReader\nimport io\n\n# Example multipart data\nbody = b'--boundary\\r\\nContent-Disposition: form-data; name=\"field1\"\\r\\n\\r\\nvalue1\\r\\n--boundary--'\nheaders = {'Content-Type': 'multipart/form-data; boundary=boundary'}\n\nreader = MultipartReader.from_response(io.BytesIO(body), headers)\nparts = []\nreader.release_all()  # iterate all parts\nfor part in reader:\n    print(part.name, part.text)\n    parts.append(part)\nprint('Done')","lang":"python","description":"Parse multipart/form-data from bytes and headers."},"warnings":[{"fix":"Replace with python-multipart or aiohttp","message":"multipart-reader is no longer actively developed. For new projects, use aiohttp's built-in multipart handling or python-multipart.","severity":"deprecated","affected_versions":"all"},{"fix":"Call part.text (which decodes) or part.file for raw bytes.","message":"The reader does not automatically decode file content. Body parts are returned as bytes; you must manually decode if text is expected.","severity":"gotcha","affected_versions":"0.x"},{"fix":"Wrap your data in io.BytesIO(...) before passing.","message":"MultipartReader expects a BytesIO-like object, not a file path or string. Passing a string will fail silently.","severity":"gotcha","affected_versions":"0.x"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from multipart_reader import MultipartReader' and create reader via 'MultipartReader.from_response(stream, headers)' if available; else use 'MultipartReader.from_stream'.","cause":"Using an outdated or incorrect import path; trying to call a method that may not exist in this version.","error":"AttributeError: 'MultipartReader' object has no attribute 'from_response'"},{"fix":"Run 'pip install multipart-reader' and import as 'from multipart_reader import MultipartReader'.","cause":"Trying to import from the wrong module name; correct module is 'multipart_reader'.","error":"ModuleNotFoundError: No module named 'multipart'"},{"fix":"Call 'reader.release_all()' before iterating, or use 'for part in reader: ...' only once.","cause":"Iterating over the reader without calling 'release_all()' first, or the reader is already exhausted.","error":"TypeError: 'NoneType' object is not iterable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}