Skip to main content

Libs check filetype

Project description

Thư viện kiểm tra extension file.

Cài đặt:

 $ pip3 install validate-extension-file

Sử dụng

from truestrive.libs.filetypes.file import File
from truestrive.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 truestrive.libs.filetypes.common import ExtensionImage
ExtensionImage.LIST_EXTENSION_SUPPORTED
  • Extension Document:
from truestrive.libs.filetypes.common import ExtensionDocument
ExtensionDocument.LIST_EXTENSION_SUPPORTED
  • Extension Audio:
from truestrive.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

validate-extension-file-0.0.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

validate_extension_file-0.0.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file validate-extension-file-0.0.3.tar.gz.

File metadata

  • Download URL: validate-extension-file-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.9

File hashes

Hashes for validate-extension-file-0.0.3.tar.gz
Algorithm Hash digest
SHA256 509ae3c20f30ef95077235e8dff73c9b3722a18bfff7ac6474a6091e5b8ed8cd
MD5 3a498e2d3d7ce037b5adb80cb31cc5df
BLAKE2b-256 33dc0c40fbeaa349613a493493a8feb55ea19a058523d9ccd8bf85342217460e

See more details on using hashes here.

File details

Details for the file validate_extension_file-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for validate_extension_file-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 138f8c7d49fb2224aefd4e420ecbfe39ea43c5563e2d0d3ebf834bd61484206b
MD5 897b816c14e41f8101b9ff3ae23b923b
BLAKE2b-256 da2c2506df6fa5ffebca6bf46b92092f59c370aa93ae8f1d22cf5684cc37b607

See more details on using hashes here.

Supported by

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