Skip to main content

FormatDetector

release pypi support-version license commit

A python library that can easily find out the real format of a binary file with a common format.

可以轻松找到一个常见格式的二进制文件的真实格式。

The result of the finder may be wrong, please be careful.

这个工具返回的结果可能是错误的,请谨慎使用。

If you find any bug or mistake, please report it in issues.

如果你发现了任何 bug 或者错误,请在 issues 中告诉我。

Install 安装

pip install formatdetector

Usage 使用

from formatdetector import get_file_format

get_file_format('xxx.zip')  # ['zip', 'jar', 'apk', 'xapk']
get_file_format('fff.mp3')  # ['ogg'] # so the 'mp3' tag may be wrong
get_file_format('hhh')  # ['rar'] # now you find out the real format of the file with no extension name

Changelog 更新日志

Thanks 致谢

python3通过文件头判断文件类型

Metadata

Release files for formatdetector 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for formatdetector 0.2.0
File Size Uploaded Provenance Actions
formatdetector-0.2.0.tar.gz 9.4 kB Without provenance Details for formatdetector-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for formatdetector 0.2.0
File Interpreter ABI Platform Actions
formatdetector-0.2.0-py3-none-any.whl Python 3 none any Details for formatdetector-0.2.0-py3-none-any.whl

Total release size: 18.1 kB

Release files / formatdetector-0.2.0.tar.gz

Download URL formatdetector-0.2.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
930e3eea2d41c3ba844a7f5bc70fc0eb678e76928123052724c7c8d72a4b50bf
BLAKE2b-256 checksum
How to use checksums
0f2df60f6531c5b3a502ee9037c2ffaec123868b8a8653a2914d957f6f580ef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / formatdetector-0.2.0-py3-none-any.whl

Download URL formatdetector-0.2.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e84de9499e741df69016fa613e2a93c92361337c65f126bf12af54d447d6c38c
BLAKE2b-256 checksum
How to use checksums
6af7309435861936753d3e4e0e928aeaacd396401abaa78fe52d5a7378c97a20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for formatdetector 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page