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-0.1.6.tar.gz
(19.8 kB
view details)
File details
Details for the file m-filetypes-0.1.6.tar.gz
.
File metadata
- Download URL: m-filetypes-0.1.6.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e4e0bae9c24012529399831a98cc955ee0faa47a7a0458484ec126fb57249ad |
|
MD5 | 0fde5e4cb9817083804a5170d6521fce |
|
BLAKE2b-256 | b9c5c309c584f9e8dc779c0e56bbc77969033b021ef37c2185522c1fd75fdfcf |