hermetic-python-magic
A hermetic fork of python-magic that bundles a
prebuilt libmagic and its magic.mgc database, so no system-wide libmagic install is
required. The public API is the same as python-magic, imported as hermetic.magic.
Prerequisites
- Python 3.10 or later.
Installation
pip install hermetic-python-magic
Usage
import hermetic.magic as magic
magic.from_file("test.pdf")
# 'PDF document, version 1.2'
magic.from_file("test.pdf", mime=True)
# 'application/pdf'
magic.from_buffer(open("test.pdf", "rb").read(1024))
# 'PDF document, version 1.2'
Acknowledgments
The Python bindings are ported from python-magic
by Adam Hupp. The bundled libmagic and magic.mgc database are built from
file by Ian F. Darwin and Christos Zoulas. See NOTICE
for full attribution and LICENSE for the licenses of both projects.
License
MIT, see LICENSE.
Metadata
Release files for hermetic-python-magic 0.4.28
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 |
|---|---|---|---|---|
| hermetic_python_magic-0.4.28.tar.gz | 5.9 kB | With provenance | Details for hermetic_python_magic-0.4.28.tar.gz |
Built distributions (wheels)
Total release size: 12.5 MB
Release files / hermetic_python_magic-0.4.28.tar.gz
| Download URL | hermetic_python_magic-0.4.28.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
589fa36aa848d7e44eec8058190d119eaeaa75e704ac32dbe092e4754690854b
|
|
BLAKE2b-256 checksum How to use checksums |
71ed9ebf5122a2560663f7a180e5fdc635a1b475b0df0cb633769aab30d6bc2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
| Download URL | hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl |
|---|---|
| Size | 955.8 kB |
| Tags | CPython 3.14 Linux glibc 2.38+ x86-64 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
1237ce000ba9a1be1f8a3afd95ac56813aca1df577be28878b1bcd495fc6cfb0
|
|
BLAKE2b-256 checksum How to use checksums |
30f7964abd10c934964abe72b27cf9867110b60672a7c576e6b5a70a0574adf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
| Download URL | hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.14 Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
089e39ea333817e8487389202d229187d91fc3f7d795578243674b4d21c68f7f
|
|
BLAKE2b-256 checksum How to use checksums |
89431db73ae009c3e905bdbe3a9f17f29232c81bfc916028def8fdd92527bf01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
91762911c62f166df7277b0b93120809981613fe9b0d714ebd41a9f76d0afb1b
|
|
BLAKE2b-256 checksum How to use checksums |
a9332673278618dc2b22b782edbbabecf8849abc7f837460e9dbbe29fc7f977e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
| Download URL | hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl |
|---|---|
| Size | 955.8 kB |
| Tags | CPython 3.13 Linux glibc 2.38+ x86-64 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
b75e9cb873f69911d916ca679f33d5fc5c040c850faa82660971f24a0472b967
|
|
BLAKE2b-256 checksum How to use checksums |
6f99ad832a34d2e8fb4a891a9ec4e3912c755b03db3ff88d9029ee76ff538689
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
| Download URL | hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.13 Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d56569736a70589d28df5a04f547489c406f71f6bd52bcf18fa406377f0279a
|
|
BLAKE2b-256 checksum How to use checksums |
4404375b46feee821c41d6da88332677a399f9a3f131ff968b0a1fbff4302553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
88ba75e2a9c921d7a43d1a9251c2296fb8e4d8ae2a9a6165cf40ac64fe488d69
|
|
BLAKE2b-256 checksum How to use checksums |
c7b7d32b76f4fe2ffab4cbf9f0f8f1eab6c754d1dd5d18c8cc754881cd2a5ae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
| Download URL | hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl |
|---|---|
| Size | 955.8 kB |
| Tags | CPython 3.12 Linux glibc 2.38+ x86-64 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
bc7e43ee3f93d985312fac19e7bbae8ba26f496716177b304919e5f29fb46d01
|
|
BLAKE2b-256 checksum How to use checksums |
5668c35d562336edfa17cb693e46c1a1b4f89875962bf99d027283bf391719d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
| Download URL | hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.12 Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
41d792f1daeb6befc6b1f61e04f0842e5537fd49dc814942b25870289237bb3e
|
|
BLAKE2b-256 checksum How to use checksums |
46534472c8b15bb5eca4a0350e6f7ffb4738f37a9cb5c07144a6a341ac43616d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d24cd9523cbf12919e5b7c1b9097acca00b0f32b1b0217a46f53e66054ad172
|
|
BLAKE2b-256 checksum How to use checksums |
66c7a7d9e024c3c315e3b37944d383699e46b29b557996e8d1fe0046d4089482
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
| Download URL | hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl |
|---|---|
| Size | 955.8 kB |
| Tags | CPython 3.11 Linux glibc 2.38+ x86-64 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
87bb44e4c4f3ee4123173bc6fb931b3b709a10080cd73af20ed7977dbfc5408c
|
|
BLAKE2b-256 checksum How to use checksums |
b27c4f563028ff2a8d30ab5fd08003c62bf22396d4a32f45ca3f1316a441c791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
| Download URL | hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.11 Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
ac5011d332073f253426de2aa1d3e65395a1edc6258dd0052fddd7a17a9d4d6b
|
|
BLAKE2b-256 checksum How to use checksums |
2857299a7e7bdeeecfba9d95a074964bef2c0014835ef9bcd265acd5f13e1fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
041db6fdbd05c8086b5d6b94fff087b92bc6797aa63d4ec0dd7eadfbc455684b
|
|
BLAKE2b-256 checksum How to use checksums |
2a9cdd4b06ac887f262864750f2be01bd32d4a649b58d0450c186d16d48e15f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
| Download URL | hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl |
|---|---|
| Size | 955.8 kB |
| Tags | CPython 3.10 Linux glibc 2.38+ x86-64 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
23a8d3581bc87a8237f0eeb4d6abd1dabd046474a94be53de1a20fab30685cdd
|
|
BLAKE2b-256 checksum How to use checksums |
f0431366197678c3c21dfd0e403294f476db64f1d5e5147fd08ce9e88f315c24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
| Download URL | hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.10 Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
8a50fc6fc68e2eda3e1480303c703c4f2610a34555791b815f4268447c282db8
|
|
BLAKE2b-256 checksum How to use checksums |
5a2543c3d818ae1c6890498ad1f5173b1ec4e866091161f2b3f6fe3d467ca510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl
| Download URL | hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.10 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b6f1005aa67dc3e6a1f101d80012bde569f901cf00c7cff647d26c06300401cd
|
|
BLAKE2b-256 checksum How to use checksums |
04de5c45554bdaf7aa62dbb6801f134a38953aa7c21d0586bf21e1cda2f04947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logSecurity for hermetic-python-magic 0.4.28
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.
Full provenance
All 16 files in this release have been uploaded with provenance metadata.
Attestation for hermetic_python_magic-0.4.28.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logA 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.