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

Uploaded Source

Built Distribution

m_filetypes-0.0.9-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: m-filetypes-0.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 c6142a23b24d1af79912c0838c8c23de4eb683e38aac15d685769d34e97b8ce3
MD5 9b2e6756b4e0a51f9bc6bf4362086c7a
BLAKE2b-256 3d8ee8fb348ee3c1b517693484fd24274f335fdd20d8870802bdc3c617efce90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m_filetypes-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1a7bae9b03abf6b71b6633a3ecd253f7799476cb73c7357e0adac00650c5f841
MD5 0ba45889fd6be76ca1026206c6bd644f
BLAKE2b-256 de09893730d75a23ded69a109ff49751e5d3deba990d378bab76788a7f4581b2

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