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.6.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: m-filetypes-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 f6cf2411372a7819142fb3c033e2acfd6ff4e533e6ee07908b5aea453e810fb6
MD5 c15d30ff971ba1c9fadd49f2f03143e4
BLAKE2b-256 9e2cc336aee8f74067677551ba8012527efc865194174278c5cb81b94f37d4c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m_filetypes-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ca4ffd0e8019d1b0f2cda8ca3ddb37bc4dbe5f31b6ce7bcbc8ae095172323f70
MD5 f1b214c3352b094c7831fae551d8951c
BLAKE2b-256 ca7f7434436df40409eb3a8ebd976f0355b48f9478cc3aae8781b09ef475a88d

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