File Type Guesser
Guess a file's type from its content and extension.
This is intended to be a pure Python implementation of something like python-magic. This means it should work on all platforms that can run Python as it does not require external binaries like libmagic.
This project currently is not heavily tested and not fully feature complete
Example Of Use
from pathlib import Path
from file_type_guesser import guess_file
path = Path("README.md")
guess = guess_file(path)
print(guess)
ContentGuess(category=<FileTypes.TEXT: 1>, extention='md', content_ext='md')
Metadata
Release files for file-type-guesser 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| file-type-guesser-0.2.0.tar.gz | 5.3 kB | Without provenance | Details for file-type-guesser-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| file_type_guesser-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for file_type_guesser-0.2.0-py3-none-any.whl |
Total release size: 11.8 kB
Release files / file-type-guesser-0.2.0.tar.gz
| Download URL | file-type-guesser-0.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcc88f62d615afe5423915c23bdae9662371d52c4af626964413bc9ad5659ff5
|
|
BLAKE2b-256 checksum How to use checksums |
1c6f9b6653877e6023d1611584a81b4424c30ce072575ca37aa4c0976d114836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / file_type_guesser-0.2.0-py3-none-any.whl
| Download URL | file_type_guesser-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7659be8196aea8da002e0001e570e43a4a7275a1fbe32e35217f0164cee99882
|
|
BLAKE2b-256 checksum How to use checksums |
4e26472ade76b6ec1a0971a7674d17862176b60484d7aad9e3fa91f5f1b27bda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for file-type-guesser 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.