Skip to main content

Unpack a MIME message into a directory of files.

Project description


Unpack a MIME message into a directory of files.


MIME messages can be useful as cheap archives: unlike zipfile/tarfile standard modules, email.mime.multipart does not require a full-functional file to create an archive. MIME messages lack the ability to seek to a given file efficiently (much like tar), they have no standard compression (but it can be handled independently anyway), and lack a standard tool to extract them.

Inspired from python’s email examples .


Extract to directory $PWD/some

$ demultipart /path/to/some.multipart

Any number of multipart files can be specified, they will be extracted in provided order in their own directories.

Tries to prevent escaping extraction directory, but not tested on Windows.

Skips input file if extraction directory already exists.


  • Provide compatibility with standard CLI archive manipulation tools (tar, unzip…) so GUI can wrap this command too.
  • Maybe add multipart creation support.

Project details

Download files

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

Files for demultipart, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size demultipart-0.2.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page