mimesniff
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
Metadata
Release files for mimesniff 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mimesniff-1.1.1.tar.gz | 3.4 kB | Without provenance | Details for mimesniff-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mimesniff-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for mimesniff-1.1.1-py3-none-any.whl |
Total release size: 11.2 kB
Release files / mimesniff-1.1.1.tar.gz
| Download URL | mimesniff-1.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bfd57a566d736dd8673eea3eedd699bde92066974f693dd7c2d48347b2cbde0
|
|
BLAKE2b-256 checksum How to use checksums |
b7f97a7e7e9e5a89a6ba59e152b893a8be761083455aeb7749a0452ef975aeb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.7
|
Release files / mimesniff-1.1.1-py3-none-any.whl
| Download URL | mimesniff-1.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25d1245f78e4e9940342cc4df1025d5afcd38bc96ad047e84a9a434796b8c20f
|
|
BLAKE2b-256 checksum How to use checksums |
92465c7deba62f6c383f6532d820b2c58f7244a9a48fab64d1d4087087f4d182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.7
|
Security for mimesniff 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.