File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change
1
+ Python-MimeParse
2
+ ================
3
+
1
4
.. image :: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master
2
5
:target: https://travis-ci.org/dbtsai/python-mimeparse
3
6
@@ -7,7 +10,7 @@ handle matching mime-types against a list of media-ranges. See section
7
10
a complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2
8
11
9
12
Installation
10
- ============
13
+ ------------
11
14
12
15
Use **pip **:
13
16
@@ -18,36 +21,31 @@ Use **pip**:
18
21
It supports Python 2.7 - 3.5 and PyPy.
19
22
20
23
Functions
21
- =========
24
+ ---------
22
25
23
- ``parse_mime_type() ``
24
- ----------------------
26
+ **parse_mime_type() **
25
27
26
28
Parses a mime-type into its component parts.
27
29
28
- ``parse_media_range() ``
29
- -----------------------
30
+ **parse_media_range() **
30
31
31
32
Media-ranges are mime-types with wild-cards and a "q" quality parameter.
32
33
33
- ``quality() ``
34
- -------------
34
+ **quality() **
35
35
36
36
Determines the quality ("q") of a mime-type when compared against a list of
37
37
media-ranges.
38
38
39
- ``quality_parsed() ``
40
- --------------------
39
+ **quality_parsed() **
41
40
42
41
Just like ``quality() `` except the second parameter must be pre-parsed.
43
42
44
- ``best_match() ``
45
- ----------------
43
+ **best_match() **
46
44
47
45
Choose the mime-type with the highest quality ("q") from a list of candidates.
48
46
49
47
Testing
50
- =======
48
+ -------
51
49
52
50
Run the tests by typing: ``python mimeparse_test.py ``. The tests require Python 2.6.
53
51
You can’t perform that action at this time.
0 commit comments