wire / magic / python-pyc

Python bytecode (.pyc) signature

A Python 3.7+ bytecode file (.pyc) begins with a 16-byte header: a 4-byte magic number (version-specific, e.g. 0xCB0D0DF3 for 3.11), a 4-byte null (flags), a 4-byte modification timestamp (or 0 for hash-based), and a 4-byte source file size (or hash).

magic kind signature status de-facto verification verified tier B file-signature@1

aka: python-pyc magic · .pyc · .pyo

file signature

magic: CB 0D 0D F3 @ offset 0

.pyc.pyo application/x-python-code

spec: Python import system (PEP 552)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/magic/python-pyc or /magic/python-pyc.json