Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermetic_python_magic-0.4.28.tar.gz (5.9 kB view details)

Uploaded Source

Built Distributions

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

hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (955.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl (922.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.38+ ARM64manylinux: glibc 2.39+ ARM64

hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl (621.8 kB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (955.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl (922.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ ARM64manylinux: glibc 2.39+ ARM64

hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl (621.8 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (955.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl (922.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ ARM64manylinux: glibc 2.39+ ARM64

hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl (621.8 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (955.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl (922.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ ARM64manylinux: glibc 2.39+ ARM64

hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl (621.8 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (955.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl (922.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ ARM64manylinux: glibc 2.39+ ARM64

hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl (621.8 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file hermetic_python_magic-0.4.28.tar.gz.

File metadata

  • Download URL: hermetic_python_magic-0.4.28.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hermetic_python_magic-0.4.28.tar.gz
Algorithm Hash digest
SHA256 589fa36aa848d7e44eec8058190d119eaeaa75e704ac32dbe092e4754690854b
MD5 3b1a311c20ae150210be56c7a58b0969
BLAKE2b-256 71ed9ebf5122a2560663f7a180e5fdc635a1b475b0df0cb633769aab30d6bc2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28.tar.gz:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1237ce000ba9a1be1f8a3afd95ac56813aca1df577be28878b1bcd495fc6cfb0
MD5 d5daa760f4e81bd02302b0ca5b4a0022
BLAKE2b-256 30f7964abd10c934964abe72b27cf9867110b60672a7c576e6b5a70a0574adf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 089e39ea333817e8487389202d229187d91fc3f7d795578243674b4d21c68f7f
MD5 31fdd4db30dc483ac4308f4b188f80b2
BLAKE2b-256 89431db73ae009c3e905bdbe3a9f17f29232c81bfc916028def8fdd92527bf01

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp314-cp314-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 91762911c62f166df7277b0b93120809981613fe9b0d714ebd41a9f76d0afb1b
MD5 7bf652f5a645df3739dfc5dc6a8bfbd6
BLAKE2b-256 a9332673278618dc2b22b782edbbabecf8849abc7f837460e9dbbe29fc7f977e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b75e9cb873f69911d916ca679f33d5fc5c040c850faa82660971f24a0472b967
MD5 7a29db34b0d986360b4b399e47bf95b5
BLAKE2b-256 6f99ad832a34d2e8fb4a891a9ec4e3912c755b03db3ff88d9029ee76ff538689

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 0d56569736a70589d28df5a04f547489c406f71f6bd52bcf18fa406377f0279a
MD5 e7c01f0f85ed32b9e0fcf953f37a6039
BLAKE2b-256 4404375b46feee821c41d6da88332677a399f9a3f131ff968b0a1fbff4302553

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp313-cp313-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 88ba75e2a9c921d7a43d1a9251c2296fb8e4d8ae2a9a6165cf40ac64fe488d69
MD5 0f3716787d2624ce794244d764d13fbc
BLAKE2b-256 c7b7d32b76f4fe2ffab4cbf9f0f8f1eab6c754d1dd5d18c8cc754881cd2a5ae4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 bc7e43ee3f93d985312fac19e7bbae8ba26f496716177b304919e5f29fb46d01
MD5 fbc81ddae7312375bb402b2f05dec4d3
BLAKE2b-256 5668c35d562336edfa17cb693e46c1a1b4f89875962bf99d027283bf391719d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 41d792f1daeb6befc6b1f61e04f0842e5537fd49dc814942b25870289237bb3e
MD5 a5421e96299b0a8d9847702369bd057e
BLAKE2b-256 46534472c8b15bb5eca4a0350e6f7ffb4738f37a9cb5c07144a6a341ac43616d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp312-cp312-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6d24cd9523cbf12919e5b7c1b9097acca00b0f32b1b0217a46f53e66054ad172
MD5 7ead052593de2a2b40231ae1a5fe37af
BLAKE2b-256 66c7a7d9e024c3c315e3b37944d383699e46b29b557996e8d1fe0046d4089482

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 87bb44e4c4f3ee4123173bc6fb931b3b709a10080cd73af20ed7977dbfc5408c
MD5 fbd8cebc9e7d48ac01fe3b06d8d8e77d
BLAKE2b-256 b27c4f563028ff2a8d30ab5fd08003c62bf22396d4a32f45ca3f1316a441c791

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 ac5011d332073f253426de2aa1d3e65395a1edc6258dd0052fddd7a17a9d4d6b
MD5 b5683d1f6732b7b9989b5a223435ff36
BLAKE2b-256 2857299a7e7bdeeecfba9d95a074964bef2c0014835ef9bcd265acd5f13e1fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp311-cp311-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 041db6fdbd05c8086b5d6b94fff087b92bc6797aa63d4ec0dd7eadfbc455684b
MD5 8ef34ecee4403a51a488d40e0e428eee
BLAKE2b-256 2a9cdd4b06ac887f262864750f2be01bd32d4a649b58d0450c186d16d48e15f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 23a8d3581bc87a8237f0eeb4d6abd1dabd046474a94be53de1a20fab30685cdd
MD5 3adcedbafec57c5f063eff4c4b9abf51
BLAKE2b-256 f0431366197678c3c21dfd0e403294f476db64f1d5e5147fd08ce9e88f315c24

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 8a50fc6fc68e2eda3e1480303c703c4f2610a34555791b815f4268447c282db8
MD5 2e128929ee5a04daa7a71bf963384052
BLAKE2b-256 5a2543c3d818ae1c6890498ad1f5173b1ec4e866091161f2b3f6fe3d467ca510

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp310-cp310-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b6f1005aa67dc3e6a1f101d80012bde569f901cf00c7cff647d26c06300401cd
MD5 f9208b5b1c41f4851eb2175b676fdd6c
BLAKE2b-256 04de5c45554bdaf7aa62dbb6801f134a38953aa7c21d0586bf21e1cda2f04947

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermetic_python_magic-0.4.28-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: release.yml on audivir/hermetic-python-magic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.28 This release

16 files

0.4.27

11 files

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