Pure python mimesniff implementation of https://mimesniff.spec.whatwg.org
Project description
Pure python mimesniff implementation of https://mimesniff.spec.whatwg.org
API interface is similar with API of python standard library
Install
pip install mimesniff
Usage
import mimesniff res = mimesniff.what('sample.mp3') print(res) # audio/mpeg with open('sample.mp3', 'rb') as fin: res = mimesniff.what(fin) print(res) # audio/mpeg with open('sample.mp3', 'rb') as fin: header = fin.read(512) res = mimesniff.what(header) print(res) # audio/mpeg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Built Distribution
Close
Hashes for mimesniff-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85c14c96052f80aecaf744771f4f72beee93e4d860d3c42742fea12218fb2e51 |
|
MD5 | 01dd0bef6f1ec920556fbad8e3fb77f9 |
|
BLAKE2-256 | 103254e00f6757fc9044a2782a1ce629e4816be5e8c0b830a37095557dc42831 |