Skip to main content

Siegfried as a Python extension

Project description

PyPI version

Pygfried

pygfried is a CPython extension that brings siegfried - a powerful, signature-based file format identification tool written in Go - into the Python ecosystem.

Identifying a file with pygfried

Instead of reimplementing siegfried's logic, pygfried embeds the original Go code directly, making core siegfried functionality available to Python users without any changes to the underlying detection engine.

No animals were harmed in the making of this extension.

Usage

$ pip install pygfried
$ python -q
>>> import pygfried
>>> pygfried.version()
'1.11.2'
>>> pygfried.identify("example.png")
'fmt/11'
>>> pygfried.identify("example.png", detailed=True)
{'siegfried': '1.11.2', 'scandate': '2025-06-10T07:16:31+02:00', 'signature': 'default.sig', 'created': '2025-03-01T15:28:08+11:00', 'identifiers': [{'name': 'pronom', 'details': 'DROID_SignatureFile_V120.xml; container-signature-20240715.xml'}], 'files': [{'filename': 'example.png', 'filesize': 237675, 'modified': '2025-06-10T07:11:26+02:00', 'errors': '', 'matches': [{'ns': 'pronom', 'id': 'fmt/11', 'format': 'Portable Network Graphics', 'version': '1.0', 'mime': 'image/png', 'class': 'Image (Raster)', 'basis': 'extension match png; byte match at [[0 16] [237663 12]]', 'warning': ''}]}]}

Limitations

Go libraries can clash

This project uses Go's -buildmode=c-shared to provide its Python extension. Loading multiple Go-based shared libraries in the same process is unsupported and may result in panics or crashes due to conflicts between separate Go runtimes.

This limitation should only affect you if you're using pygfried together with another Python library that also uses a Go extension (built with the same c-shared mechanism) in the same process. If you're just using pygfried on its own, you don't need to worry - everything should work as expected.

Credits

pygfried is powered by the original siegfried project, which is distributed under the Apache License, Version 2.0. All core file format identification logic and signatures are provided by siegfried. We gratefully acknowledge the work of the siegfried project and its contributors.

Project details


Download files

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

Source Distribution

pygfried-0.13.0.tar.gz (656.7 kB view details)

Uploaded Source

Built Distributions

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

pygfried-0.13.0-cp314-cp314-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.14Windows x86-64

pygfried-0.13.0-cp313-cp313-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.13Windows x86-64

pygfried-0.13.0-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

pygfried-0.13.0-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

pygfried-0.13.0-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

pygfried-0.13.0-cp310-abi3-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

pygfried-0.13.0-cp310-abi3-macosx_15_0_universal2.whl (2.1 MB view details)

Uploaded CPython 3.10+macOS 15.0+ universal2 (ARM64, x86-64)

File details

Details for the file pygfried-0.13.0.tar.gz.

File metadata

  • Download URL: pygfried-0.13.0.tar.gz
  • Upload date:
  • Size: 656.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0.tar.gz
Algorithm Hash digest
SHA256 4fc0a3c950468446bbf867e2606b732db1485cfae6bd05c1a0c484cb764d57f9
MD5 6391101544807077c96e3312fa0ab407
BLAKE2b-256 b092e5764a480407ea5e9421acef0a676b0163aec6c80d84b230307566164c87

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0.tar.gz:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pygfried-0.13.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 dd2485159d3f76f81e94d7a16b5b6688ab8b26e668c03947a298f1aef952373c
MD5 e2f0004dedec2401475355b8a2794ce0
BLAKE2b-256 3adf10ab377aa6369ae207959981fc5528195503dfff46e1b37be7384b40f168

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp314-cp314-win_amd64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pygfried-0.13.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 530d716677c01380cc5f6dcba700f78aeae523f509d7384893b11a4e76e99f25
MD5 57796c34c565ffcf5a7d385888b21fc5
BLAKE2b-256 24080ccf0aef1072862f554c615a460f485a898ec2e38041411fcc148ad2a41f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pygfried-0.13.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 60ecde60493b9b2a306fd8c712eb56e2ec33ff1d7243ba2cd5142c4529071d7d
MD5 420405fd9244234785814646bf879165
BLAKE2b-256 215ba5c5440332f0244c573fcc9051d1fe0b3ae11a2e450bd718811bcfba88b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pygfried-0.13.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 831935374bce268973f6ec28ac19acf731fde73d515366b5c1dfba473bf3ae09
MD5 b03778050dfa77fb18f798e1ddda357b
BLAKE2b-256 a1d400ad6ab1a382d608fd8767fe1b2f314a1df8dc4951423e0a59f3cfbf1316

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pygfried-0.13.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygfried-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e8116a9a7cb910e85712fc1bc767fd911e4318663e504ddcc5f0a0b9a2de731f
MD5 d39529f4cd64fe28f0a6890da26f8997
BLAKE2b-256 55422abb23245146e782b00d53d3ab3f457a99741d182c4810b6e516974f0675

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp310-abi3-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygfried-0.13.0-cp310-abi3-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 513acef3f9aa4bcc357d35eb974222c05ebc8dac31bc1f89d1556532868c98bc
MD5 c6aae79fa1fe83c61427cc2506a3133f
BLAKE2b-256 9242bd16b7de20fca37995d768493c69b136d002aa3c34589b6a0e7897b4e485

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp310-abi3-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

File details

Details for the file pygfried-0.13.0-cp310-abi3-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pygfried-0.13.0-cp310-abi3-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 bf795403ea2470e7eb48f4bb5049e0d6eebed6457de835c4a57e8bd9050b71ef
MD5 e2f5443be4bf90c26f541f44c9a5ea2d
BLAKE2b-256 b8b3eb37fcbdac1b901d90507836157db87fddc3f75450d19fe0248fdf711522

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygfried-0.13.0-cp310-abi3-macosx_15_0_universal2.whl:

Publisher: release.yml on artefactual-labs/pygfried

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page