Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

validate-extension-file-0.0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

validate_extension_file-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file validate-extension-file-0.0.1.tar.gz.

File metadata

  • Download URL: validate-extension-file-0.0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.9

File hashes

Hashes for validate-extension-file-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8b7bb51ed011375934bd226a64c60cb12a7d0043363d65dd40179e3dbfe28c21
MD5 0e5b34b3a67897ddf99a2bd11af7fc82
BLAKE2b-256 d872c64780f68934c2110b31e0cb542652d651cdf8c2ed9e553032cb01686b77

See more details on using hashes here.

File details

Details for the file validate_extension_file-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for validate_extension_file-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9141f95d8c1a050ea868801e1359f29d21baab298f7b78ec7c6b6a4bb53ec26
MD5 0c5efbae9137d60ab966012d7db6059f
BLAKE2b-256 82cdece0f0bc71ef11b2bcde1d4559c4ace9e7dbb7887e57b0436a5ccac01974

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page