Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Processing block structured binary files.

Project description

The Python File Format Interface, briefly PyFFI, is an open source Python library for processing block structured binary files:

  • Simple: Reading, writing, and manipulating complex binary files in a Python environment is easy! Currently, PyFFI supports the NetImmerse/Gamebryo NIF and KFM formats, CryTek’s CGF format, the FaceGen EGM format, the DDS format, and the TGA format.
  • Batteries included: Many tools for files used by 3D games, such as optimizers, stripifier, tangent space calculator, 2d/3d hull algorithms, inertia calculator, as well as a general purpose file editor QSkope (using PyQt4), are included.
  • Modular: Its highly modular design makes it easy to add support for new formats, and also to extend existing functionality.


Get PyFFI from Github, or install it with:

easy_install -U PyFFI


pip3 install PyFFI


To get the latest (but possibly unstable) code, clone PyFFI from its Git repository:

git clone --recursive git://
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt

Be sure to use the –recursive flag to ensure that you also get all of the submodules.

If you wish to code on PyFFI and send your contributions back upstream, get a github account and fork PyFFI.


We love tests, they help guarantee that things keep working they way they should. You can run them yourself with the following:

source venv/bin/activate
nosetest -v test


source venv/bin/activate
py.test -v tests


All our documentation is written in ReST and can be generated into HTML, LaTeX, PDF and more thanks to Sphinx. You can generate it yourself:

source venv/bin/activate
cd docs
make html -a


Questions? Suggestions?

Project details

Download files

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

Files for PyFFI, version 2.2.3
Filename, size File type Python version Upload date Hashes
Filename, size PyFFI-2.2.3-py3-none-any.whl (547.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size PyFFI-2.2.3.tar.gz (1.4 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page