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

Uploaded Source

Built Distribution

m_filetypes-0.0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: m-filetypes-0.0.2.tar.gz
  • Upload date:
  • Size: 7.6 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.2.tar.gz
Algorithm Hash digest
SHA256 94c04e55efe210127ff3319d183287fc5253c39298404173b757d0d34d7bb1e5
MD5 a9d0f1605b08bf02177d756928884977
BLAKE2b-256 ad49fbcfa50e50dfeff73647a5cca3d164f4f872e2211a3c9e7be7d0f08f5373

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m_filetypes-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 98e1042ce8ed9a97cd51722da8573ffda0ce95c54e8b73fce8063a495fb65d68
MD5 e70756abd9a7dff554b9a3a32bf74acd
BLAKE2b-256 2548d2b613ba1145454fbcff648f0e02bed9077246deebcf10d9569abf6d3b3c

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