Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 58c1bb9

Browse files
authored
Update README.md
1 parent 9c2d2ff commit 58c1bb9

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

README.md

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,7 @@
11
# pantomime
22

3-
[![build](https://github.com/alephdata/pantomime/actions/workflows/build.yml/badge.svg)](https://github.com/alephdata/pantomime/actions/workflows/build.yml)
4-
5-
``pantomime`` is a small library that handles the parsing and normalisation
6-
of internet MIME types in Python. This can be useful to normalise invalid,
7-
or misformatted MIME types emitted by remote web servers.
8-
9-
## Usage
10-
11-
The simplest use is to normalise a MIME type:
12-
13-
```python
14-
from pantomime import normalize_mimetype
15-
16-
assert normalize_mimetype('TEXT/PLAIN') == 'text/plain'
17-
assert normalize_mimetype('plain/text') == 'text/plain'
18-
assert normalize_mimetype(None) == 'application/octet-stream'
19-
assert normalize_mimetype('') == 'application/octet-stream'
20-
```
21-
22-
Internally, `pantomime` uses a `MIMEType` object to handle parsing. It can
23-
be used to access more specific information, like human readable labels:
24-
25-
```python
26-
from pantomime import parse_mimetype
27-
28-
parsed = parse_mimetype('text/plain')
29-
assert parsed.family == 'text'
30-
assert parsed.subtype == 'plain'
31-
assert parsed.label == 'Plain text'
32-
```
33-
34-
## Open issues
35-
36-
* Internationalisation, i.e. make the human-readable labels available in
37-
multiple languages.
38-
* Expand replacements for specific MIME types.
3+
**NOTICE** The functionality contained in `pantomime` is now maintained as part of `rigour`, which combines data validation for several `followthemoney`-related data formats. See https://opensanctions.github.io/rigour/mime/ for details.
394

405
## License
416

42-
Licensed under MIT terms, see the ``LICENSE`` file included in this repository.
7+
Licensed under MIT terms, see the ``LICENSE`` file included in this repository.

0 commit comments

Comments
 (0)