Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Stream IO for multipart MIME content

Project Description

MIME content stream reader for Python.

mime-streamer is licensed under the MIT License (MIT).

Basic Usage

from StringIO import StringIO
from pkg_resources import resource_string
from mime_streamer import MIMEStreamer

raw = resource_string('tests', 'data/multipart_related_basic')

streamer = MIMEStreamer(StringIO(raw))

with streamer.get_next_part() as part:
    headers = part.headers
    assert 'Multipart/Related' in headers['content-type']
    assert 'start="<>"' in headers['content-type']
    assert == ''

with streamer.get_next_part() as part:
    assert part.headers['content-id'] == '<>'
    assert '10\r\n34\r\n10' in

with streamer.get_next_part() as part:
    assert part.headers['content-id'] == '<>'
    assert 'gZHVja3MKRSBJIEUgSSB' in


pip install mime-streamer


The library currently is missing the following features:

  • Nested multipart messages
  • Python 3.x
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mime-streamer-0.1.0.dev0.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source May 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting