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.7.tar.gz
(19.8 kB
view details)
File details
Details for the file m-filetypes-0.1.7.tar.gz
.
File metadata
- Download URL: m-filetypes-0.1.7.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 | e06f360a81de69647485b44fc2f91e8dcf7ba011f9506fdcfe854b88cbb3c657 |
|
MD5 | 51910a2ae7b1395653c6952f98961da4 |
|
BLAKE2b-256 | 652d0e6880c274702e01449e5c9781d3c058649534acbee48ef4a5c92812dce7 |