Fast MIME
Support Rails/Marcel style MIME for Python.
It uses Apache Tike's rule.
It's customizable.
Install
pip install fast-mime
Usage
Detect MIME
from fast_mime import MIME
with open("a.pdf") as fi:
mime = MIME(file=fi, name="a.pdf", declared_type="application/pdf", extension=".pdf")
# all parameters are optional
Customize MIME rules
from fast_mime import Mime
# define your own mime rule
MIME = Mime.from_xmls(your_rule_file_name)
Patch MIME
class MyMime(Mime):
def _patch(self):
super()._patch()
...
Metadata
Release files for fast-mime 0.1.3
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 |
|---|---|---|---|---|
| fast_mime-0.1.3.tar.gz | 48.7 kB | Without provenance | Details for fast_mime-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_mime-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for fast_mime-0.1.3-py3-none-any.whl |
Total release size: 99.4 kB
Release files / fast_mime-0.1.3.tar.gz
| Download URL | fast_mime-0.1.3.tar.gz |
|---|---|
| Size | 48.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bd1c62ce9110cd246b9bb9ac82c5543d74d0d01460e5ddec2256aed2d00668b
|
|
BLAKE2b-256 checksum How to use checksums |
a99509e6af2490b2781baf9a8ab81d64cfab2442bb161424aed53227e77423ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0
|
Release files / fast_mime-0.1.3-py3-none-any.whl
| Download URL | fast_mime-0.1.3-py3-none-any.whl |
|---|---|
| Size | 50.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67fc11e77dfba07a4c88520fdf0a529aafe2db81ae593462495eb0b726b38cf6
|
|
BLAKE2b-256 checksum How to use checksums |
10779050e403b587327fc5e1862f4c14976a6b3a51561f3262883c2d20f2d097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0
|
Security for fast-mime 0.1.3
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.