ahri mime
Project description
Ahri - ahri_mime
Github
Contact me ahriknow@gmail.com
How to use
-
install
pip install ahri_mime
-
import
from ahri_mime import get_ext, get_exts, get_type, get_types
-
The ahri_mime hasattr:
attribute type explain MIME file include EXT_TO_TYPE
andTYPE_TO_EXT
EXT_TO_TYPE dict key is Extension
, value isType
TYPE_TO_EXT dict key is Type
, value isExtension
get_ext function get Extension
by typeget_exts function get all Extension
s by typeget_type function get Type
by extget_types function get Type
s by ext -
Example
from ahri_mime import get_ext, get_exts, get_type, get_types def handle(): print(get_ext('x-world/x-3dmf')) print(get_exts('x-world/x-3dmf', dot=False)) print(get_type('docx', dot=False)) print(get_types('.docx')) if __name__ == "__main__": handle()
.3dm ['3dm', '3dmf', 'qd3', 'qd3d'] application/vnd.openxmlformats-officedocument.wordprocessingml.document ['application/vnd.openxmlformats-officedocument.wordprocessingml.document']
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.
Source Distribution
ahri_mime-0.0.1.tar.gz
(11.4 kB
view hashes)
Built Distribution
ahri_mime-0.0.1-py3-none-any.whl
(11.7 kB
view hashes)
Close
Hashes for ahri_mime-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220a52f84540f0794fb6639bfca67484f3c3ecc26d485a2740526a736410b82f |
|
MD5 | 96bacc6cf1f83cc5017f8e2599bea685 |
|
BLAKE2b-256 | 9d10626837ea9c72e6cc063a08c8e1217544b8292a0522ebeffd34cd8998c73e |