Skip to main content

This is a package for handling error files

Project description

ErrorFile

ErrorFile是一个用于检测和识别各种文件错误的Python包,包括图片、PDF、Excel和Word文件。通过使用不同的检测模式,可以快速或精确地识别文件中的潜在问题。

安装

你可以通过pip安装ErrorFile

pip install ErrorFile

快速开始

使用ErrorFile非常简单。首先,导入FileInspector类,然后创建一个实例,并指定要检查的文件路径和(可选的)检查模式。

示例

from ErrorFile.Detection.FileInspector import FileInspector

file_path = 'TestFiles/test.pdf'
image_mode = 'precise'  # 或 'fast'
result = FileInspector(file_path, image_mode).inspect()
print(result)

支持的文件类型

目前,ErrorFile支持以下文件类型的检查:

  • 图片(JPEG, JPG, PNG, GIF, BMP, WEBP, TIFF, SVG)
  • PDF
  • Excel(XLSX, XLS)
  • Word(DOCX)

检测模式

对于图片文件,支持两种检测模式:

  • fast:快速检测模式,适用于快速概览和检查大量文件。
  • precise:精确检测模式,适用于深入分析单个文件。

对于PDF、Excel和Word文件,将自动采用详细检测模式。

API参考

FileInspector

主要的类,用于初始化文件检查过程。

参数

  • file_path:要检查的文件路径。
  • image_mode:(可选)图片检查模式,默认为precise

方法

  • inspect():执行文件检查,并返回检查结果。

贡献

欢迎贡献!如果你有任何建议或改进,请提交Pull Request或创建Issue。

许可证

ErrorFile根据Apache-2.0许可证发布。有关详细信息,请查看LICENSE文件。

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

ErrorFile-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distributions

ErrorFile-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

ErrorFile-0.1.1-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ErrorFile-0.1.1.tar.gz.

File metadata

  • Download URL: ErrorFile-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for ErrorFile-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8e14caaf6c3ff385ce5e791b79e767dcea844a0d21dc9d5ba8cbefb322d29032
MD5 45b02b7e0d203b9a3fa86946258fecb4
BLAKE2b-256 abad394435e840ffac84684c561594340fd27782f29bebadc5b30c299e790375

See more details on using hashes here.

File details

Details for the file ErrorFile-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ErrorFile-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for ErrorFile-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 230f64245405aed35a20971a8273071169560d4dde81132ccd63284078e1afda
MD5 33ea9cad933123e6b7e73adf80f75f94
BLAKE2b-256 a3ef97b62ed32aaca5fc99003d91d470938b35fa7cd6566c9f38963634185267

See more details on using hashes here.

File details

Details for the file ErrorFile-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: ErrorFile-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for ErrorFile-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d48021e0188ebec1edf3dc254654b60ebfc27577d366618e647369b4ef4f4c3d
MD5 360426c4054184eda1a6949dd0691c15
BLAKE2b-256 7e57b3a7fc035fad90852acaa79a16475822864acd543e6618458dae9af0935d

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