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

m-filetypes-0.0.8.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

m_filetypes-0.0.8-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file m-filetypes-0.0.8.tar.gz.

File metadata

  • Download URL: m-filetypes-0.0.8.tar.gz
  • Upload date:
  • Size: 16.5 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

Hashes for m-filetypes-0.0.8.tar.gz
Algorithm Hash digest
SHA256 adc02484f497d1c24c1df63031179a1d7f36a160d79f5a05ac39e690ca0899fd
MD5 e7b42df4d033516accfa9f6e044ec0d0
BLAKE2b-256 e1b5c5a91ca40dca81c1c08e8a4e60a1b4e5474fb1505e87bd18d7bfcbdc348f

See more details on using hashes here.

File details

Details for the file m_filetypes-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: m_filetypes-0.0.8-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

Hashes for m_filetypes-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf8dcef2d89006faac3bcc0e9d6323b888fb541b794f1ce56b31723fcf0e77d4
MD5 0ab09973eb5dc32a72edd97b38f57106
BLAKE2b-256 07601e220a2cfcfa58320e81aa4029d385f81ee490148248f8a4055f761b060c

See more details on using hashes here.

Supported by

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