Skip to main content

A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.

Project description

This module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.

See section 14.1 of RFC 2616 (the HTTP specification) for a complete explanation.

Testing

The format of the JSON test data file is as follows: A top-level JSON object which has a key for each of the functions to be tested. The value corresponding to that key is a list of tests. Each test contains: the argument or arguments to the function being tested, the expected results and an optional description.

Python

The Python tests require either Python 2.6 or the installation of the SimpleJSON library.

Installing SimpleJson can be done by: sudo easy_install simplejson

Run the tests by typing: PYTHONPATH=. python tests/mimeparse_test.py

Project details


Download files

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

Source Distribution

lapis-mimeparse-0.1.5.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

lapis_mimeparse-0.1.5-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page