Libs check filetype
Project description
Thư viện kiểm tra file type.
Cài đặt:
$ pip3 install m-filetypes
Sử dụng
from mobio.libs.filetypes.file import File
from mobio.libs.filetypes.common import ExtensionImage
File.check_filetype_by_file_extensions(
file_binary=file, # Check filetype của định dạng file binary.Mặc định None
file_path=file_path, # Check filetype của path file
extensions=[ExtensionImage.PNG] # Danh sách extension cần check.
)
Lấy extensions support
- Extension Image:
from mobio.libs.filetypes.common import ExtensionImage
ExtensionImage.LIST_EXTENSION_SUPPORTED
- Extension Document:
from mobio.libs.filetypes.common import ExtensionDocument
ExtensionDocument.LIST_EXTENSION_SUPPORTED
- Extension Document:
from mobio.libs.filetypes.common import ExtensionAudio
ExtensionAudio.LIST_EXTENSION_SUPPORTED
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
m-filetypes-0.0.7.tar.gz
(16.4 kB
view details)
Built Distribution
File details
Details for the file m-filetypes-0.0.7.tar.gz
.
File metadata
- Download URL: m-filetypes-0.0.7.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6cc0f510f64821ab42be3ec20fc890990e4da0e89614cd9d902bf4924e61e2 |
|
MD5 | 5cad13788c3cb3432cda39729fdf7ee6 |
|
BLAKE2b-256 | 644d40052ae170f3c1f90229a1e1751804b462afff136c4cb5cb20b487289718 |
File details
Details for the file m_filetypes-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: m_filetypes-0.0.7-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3f86f5837b34fa773bb560fce31df1ba14c5f9c3abb0c42c4836317616eefaa |
|
MD5 | c4884f29f1871e48bf6695ac6d0368c5 |
|
BLAKE2b-256 | f416268f7a9ecf639f62c71d76b15fa21cf225cea4c4700f77705c0fb07ea26a |