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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: m-filetypes-0.0.7.tar.gz
  • Upload date:
  • Size: 16.4 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.7.tar.gz
Algorithm Hash digest
SHA256 db6cc0f510f64821ab42be3ec20fc890990e4da0e89614cd9d902bf4924e61e2
MD5 5cad13788c3cb3432cda39729fdf7ee6
BLAKE2b-256 644d40052ae170f3c1f90229a1e1751804b462afff136c4cb5cb20b487289718

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m_filetypes-0.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b3f86f5837b34fa773bb560fce31df1ba14c5f9c3abb0c42c4836317616eefaa
MD5 c4884f29f1871e48bf6695ac6d0368c5
BLAKE2b-256 f416268f7a9ecf639f62c71d76b15fa21cf225cea4c4700f77705c0fb07ea26a

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