Mobio Filetype Libs
Project description
Thư viện kiểm tra file type.
Cài đặt:
$ pip3 install m-filetype
Link chữ ký: https://en.wikipedia.org/wiki/List_of_file_signatures
Sử dụng
from mobio.sdks.filetype.file import File
from mobio.sdks.filetype.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.sdks.filetype.common import ExtensionImage
ExtensionImage.LIST_EXTENSION_SUPPORTED
- Extension Document:
from mobio.sdks.filetype.common import ExtensionDocument
ExtensionDocument.LIST_EXTENSION_SUPPORTED
- Extension Audio:
from mobio.sdks.filetype.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-test-0.1.11.tar.gz
(19.9 kB
view details)
File details
Details for the file m-filetypes-test-0.1.11.tar.gz
.
File metadata
- Download URL: m-filetypes-test-0.1.11.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3640591a131df1777225c1bfea4911dbda732ac03efbc1167e709f138d0ec00 |
|
MD5 | 6bf6dd252c75e53fda969ecf8585b4bc |
|
BLAKE2b-256 | 11d02d4b0c2fb6d708cdc67a440aa1d001fe166a3e1eba0fad374fb7ce0af455 |