actrecipemagicfile (A CFFI fork of python-magic)
actrecipemagicfile is a Python interface to the libmagic file type identification library. libmagic identifies file types by checking their headers against a predefined list. This functionality is accessible from the command line using the Unix command file.
Changelog
[2024-12-04]
New: Added support for Mac Silicon (Python 3.10, 3.11).
New: Added support for Linux ARM (Python 3.10, 3.11, 3.12).
Usage
>>> import magicfile as magic
>>> magic.from_file("testdata/test.pdf")
'PDF document, version 1.2'
>>> magic.from_buffer(open("testdata/test.pdf").read(1024))
'PDF document, version 1.2'
>>> magic.from_file("testdata/test.pdf", mime=True)
'application/pdf'
There is also a Magic class that provides more direct control,
including overriding the magic database file and turning on character
encoding detection. This is not recommended for general use. In
particular, it's not safe for sharing across multiple threads and
will fail throw if this is attempted.
>>> f = magic.Magic(uncompress=True)
>>> f.from_file('testdata/test.gz')
'ASCII text (gzip compressed data, was "test", last modified: Sat Jun 28
21:32:52 2008, from Unix)'
You can also combine the flag options:
>>> f = magic.Magic(mime=True, uncompress=True)
>>> f.from_file('testdata/test.gz')
'text/plain'
License
actrecipemagicfile is distributed under the MIT license. See the included
LICENSE file for details.
Notes:
- This package is primarily used in an internal project.
- Support for Mac Silicon and Linux ARM is effective from 2024-12-04.
Metadata
Release files for actrecipemagicfile 0.4.39
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 12.5 MB
Release files / actrecipemagicfile-0.4.39-cp314-cp314-win_amd64.whl
| Download URL | actrecipemagicfile-0.4.39-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 314.8 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
06d4a5e9b111369a97cbbe6fc77330c79b0e107b474bd42e53dc9a7ebb424473
|
|
BLAKE2b-256 checksum How to use checksums |
435061a47eb3f04c0901cd986dec021b7372c85018446e00f4cd77f9d2293eb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / actrecipemagicfile-0.4.39-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4aed6adce422d211889b180e43c9c441a0f74c9d546d6963f747959f031e165b
|
|
BLAKE2b-256 checksum How to use checksums |
1a0efd3b8139ce81744ddfce97f7b25a4b82ff60a3adc1c428c680a7fd9d3101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
2e1c865dc2c99a60f662efc22a796287293cf6b599e7832299b458c0aa225cdb
|
|
BLAKE2b-256 checksum How to use checksums |
f675e21b6f005e8784811499cdf756259b38e175f5e7bdd8cba38d96c4a36dd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp314-cp314-macosx_10_15_x86_64.macosx_14_0_arm64.whl
| Download URL | actrecipemagicfile-0.4.39-cp314-cp314-macosx_10_15_x86_64.macosx_14_0_arm64.whl |
|---|---|
| Size | 407.2 kB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2273b52505a1c701274cdb483e32b2df74942415c0de3c8a33d958b468107995
|
|
BLAKE2b-256 checksum How to use checksums |
6f6f851a1c5a0996a55101ee229a8944874fd6369eeb5ab77df06f681e746f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / actrecipemagicfile-0.4.39-cp313-cp313-win_amd64.whl
| Download URL | actrecipemagicfile-0.4.39-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 337.2 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
df8733c7670c29b0fe5b7f02940599fa209a46691dc5c05221ec59cd3b6d1c24
|
|
BLAKE2b-256 checksum How to use checksums |
4f1be42e9ec0ba9f43b8b51c39cf6254f0dfb9434b88dda74dbaa5950d722a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2a3b74b04b95eb8762a509db2208fd1c7349b79347675966f1f2dc7b6b26bb6f
|
|
BLAKE2b-256 checksum How to use checksums |
54a5c958f37a69e232f50971e28b6a5a981bf8b1d4aabff6aef55e5d49fc0f60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1a15737d921043ee14a3d016af6c49f3b61e3f8e2ac3fc79fe3d2424ab3a208e
|
|
BLAKE2b-256 checksum How to use checksums |
b68881318c0d9b8d1d2f49eb90884c245c605df2a9491dabb82cbac63278597d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp313-cp313-macosx_10_13_x86_64.macosx_14_0_arm64.whl
| Download URL | actrecipemagicfile-0.4.39-cp313-cp313-macosx_10_13_x86_64.macosx_14_0_arm64.whl |
|---|---|
| Size | 407.0 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a44c3f4e9ead35873b9e23269ddd54ddfb4cd16ade56f90591ba2acb57b8468d
|
|
BLAKE2b-256 checksum How to use checksums |
995f813405c93b21b4eef35121f2f90f2a5f5a2db35e0b57c4bf161b6c78b02c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp312-cp312-win_amd64.whl
| Download URL | actrecipemagicfile-0.4.39-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 337.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b4cc23805aec9181c4a22a5899b0815ce789c48cc7de731973a8984d7a2707be
|
|
BLAKE2b-256 checksum How to use checksums |
f431ece4fe43d296ee398ae1b2b629e2773c6abc773dac4ca86ef2d6e8298e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / actrecipemagicfile-0.4.39-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7c230e7606cfc40cff62f0ca016c4d93f49bb27ca589e10022a657551338d9c9
|
|
BLAKE2b-256 checksum How to use checksums |
1617dff33184b969f9ea1540283f4fa229d55dd8ee2e6818016ff6381bfe2023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
91f4c2d38b151ab8eba70706fc7311136847a67633693648b2343f008c198da5
|
|
BLAKE2b-256 checksum How to use checksums |
5d0d39737385401a2db0ba970b65ed095f1ffd959863c1599a73deecbbffcaac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp312-cp312-macosx_10_13_x86_64.macosx_14_0_arm64.whl
| Download URL | actrecipemagicfile-0.4.39-cp312-cp312-macosx_10_13_x86_64.macosx_14_0_arm64.whl |
|---|---|
| Size | 407.0 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9e8ee1cb7dd4ae829bca9d05d1a7c9b10a6bc6c45b7db49a379d954f252274e5
|
|
BLAKE2b-256 checksum How to use checksums |
d7a2616425a0c5a7c81ccfac8dbbad0d7afef874107c4e3eeb690f9e8a191fe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / actrecipemagicfile-0.4.39-cp311-cp311-win_amd64.whl
| Download URL | actrecipemagicfile-0.4.39-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 337.2 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4af2079b3abc0ea4bc0f50b6687ab608907ad8c3e5cffe26a7344d0455dc9322
|
|
BLAKE2b-256 checksum How to use checksums |
092d1eff4c34ee88b314887af93505f7f596f2a9688898500c871b965253a557
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / actrecipemagicfile-0.4.39-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
45a1563d85df0de5f51ea2991dbef3105ea08e6516151a3fa0fed6df04c0cd02
|
|
BLAKE2b-256 checksum How to use checksums |
25c1d47d239029fad1829716c2704f502ebfa5db27b43250fc459ff03a9c8643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / actrecipemagicfile-0.4.39-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
82eb4addb9621e274274f3e2456ba519fcf2f3d82e2afc636b1154d0639d3da2
|
|
BLAKE2b-256 checksum How to use checksums |
76cc28cda75a679d07e93d8d12d63495117432e14560a24c64415638ada1dda3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp311-cp311-macosx_10_9_x86_64.macosx_14_0_arm64.whl
| Download URL | actrecipemagicfile-0.4.39-cp311-cp311-macosx_10_9_x86_64.macosx_14_0_arm64.whl |
|---|---|
| Size | 407.1 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ea2b3397f258a4812cd9eb915f27a23802a8325c6b99b3154d41c4240f46eaca
|
|
BLAKE2b-256 checksum How to use checksums |
c020152d091ce81f2f78952c1559364ef51ab3c6ba3eb62e031e81310d74b482
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / actrecipemagicfile-0.4.39-cp310-cp310-win_amd64.whl
| Download URL | actrecipemagicfile-0.4.39-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 337.2 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cc273c1c6beb393ff82c979e0c23a8d3e0d6ca191951af13feefae39013a118e
|
|
BLAKE2b-256 checksum How to use checksums |
e9561c7a0114e508795fe91a813837f459f622e422e6a6500b6b3bfe55f336a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / actrecipemagicfile-0.4.39-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e5d8d8ab9623ff1182b54ea5d0db4b509d2ce8e0e257b0c34a041abe76a82d90
|
|
BLAKE2b-256 checksum How to use checksums |
b70afafb994a3f761decc67dd00ec554bdac3a5939f13bcfa63af36eca9c6964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
0c899e86eb0392d5d323c3969b1993c47695c6b6a8f5551609c6ec2f1994aeed
|
|
BLAKE2b-256 checksum How to use checksums |
e31ca1d6e7cbc2bed538ae35b06211d4f7389ee8ac10223347ca1182c43e2739
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp310-cp310-macosx_10_9_x86_64.macosx_14_0_arm64.whl
| Download URL | actrecipemagicfile-0.4.39-cp310-cp310-macosx_10_9_x86_64.macosx_14_0_arm64.whl |
|---|---|
| Size | 407.1 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
24c1f5e48dbf1b790d247567b6a4dcdb0f9b5207ff381d1b0d263b342422f19e
|
|
BLAKE2b-256 checksum How to use checksums |
08ce03e1852b45f3434e1c1fba58c36cb38b325032cf47643ae4ef703b8886fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / actrecipemagicfile-0.4.39-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 630.5 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
762071b91d8725084b2702cd6d7a6e96b4ec843cdd3e4408e0bf85fa38497243
|
|
BLAKE2b-256 checksum How to use checksums |
1dcc2d43b85edb07c05b1a3ec38e941dbc75aa00f9f89eeec5447b99ea7a2005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / actrecipemagicfile-0.4.39-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 627.0 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
60e30129f83204dc6f3b9aab323e32b514611d68777860a9fc5c731fb380653c
|
|
BLAKE2b-256 checksum How to use checksums |
0bd7c9fb7286af45ac3b98b49c357b1d3c60c8edc28a4d189409c33d5be5600e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actrecipemagicfile-0.4.39-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | actrecipemagicfile-0.4.39-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 641.2 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0d5c9f483102c2b080a51017dadcc3020d76cdab86abe869b50aa08cbe3d87e3
|
|
BLAKE2b-256 checksum How to use checksums |
8fc9dada6e7fcf8a7dd1506de40531fd48b70b3f8d9302f1dba1a99357a8c480
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / actrecipemagicfile-0.4.39-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | actrecipemagicfile-0.4.39-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 638.3 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7be292975a1032a8c8fb8f43b877b0a9dbba60e4e5b2097a410978d56971f654
|
|
BLAKE2b-256 checksum How to use checksums |
0a30dff023f738d524206a663cc1f3afc33a366996cf33897cd167581acb910f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for actrecipemagicfile 0.4.39
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.