{"library":"poster3","title":"Poster3","description":"Poster3 (version 0.8.1) is a Python library providing support for streaming HTTP POST requests and multipart/form-data encoding. It's a fork of the original 'poster' package, designed to address the limitation in Python's standard library where large files had to be loaded entirely into memory before uploading. The library allows for efficient uploading of large files without excessive memory consumption. Its last release was in December 2018, indicating a maintenance-level release cadence.","language":"python","status":"maintenance","last_verified":"Sun May 17","install":{"commands":["pip install poster3"],"cli":null},"imports":["from poster.encode import multipart_encode","from poster.streaminghttp import register_openers"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nimport urllib.request\nfrom poster.encode import multipart_encode\nfrom poster.streaminghttp import register_openers\n\n# Register the streaming http handlers with urllib2\nregister_openers()\n\n# Prepare file and simple field for upload\nfilename = 'test_upload.txt'\nwith open(filename, 'w') as f:\n    f.write('This is a test file for poster3 upload.')\n\n# 'datagen' is a generator object that yields ranges of the encoded multipart data\n# 'headers' is a dictionary of headers that must be included with the request\ndatagen, headers = multipart_encode({\"field1\": \"value1\", \"file1\": open(filename, \"rb\")})\n\n# In a real scenario, you'd replace this with your actual upload URL\nupload_url = os.environ.get('POSTER3_TEST_URL', 'http://httpbin.org/post')\n\n# Create the request object\nrequest = urllib.request.Request(upload_url, datagen, headers)\n\n# Actually upload the file\nprint(f\"Uploading to {upload_url}...\")\ntry:\n    response = urllib.request.urlopen(request)\n    print(\"Upload successful!\")\n    print(response.read().decode('utf-8'))\nexcept urllib.error.URLError as e:\n    print(f\"Upload failed: {e.reason}\")\nfinally:\n    # Clean up the test file\n    os.remove(filename)\n","lang":"python","description":"This quickstart demonstrates how to use `poster3` to upload a file along with other form data using `urllib.request`. It registers the streaming HTTP handlers, encodes the multipart data, and then sends the request. Remember to replace `POSTER3_TEST_URL` with your actual endpoint.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.8.1","pypi_latest":"0.8.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"19.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.4M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"poster3","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"18M"}]}}