bfi
A fast optimizing Brainfuck interpreter in pure python
Decision gist · record as of 2026-08-14
Yes, if you need to run or study Brainfuck code. The package is lightweight, dependency-free, and genuinely faster than comparable pure-Python alternatives. However, maintenance is aging (last release 279 days ago), so treat it as stable but not actively developed. Not relevant for production systems or non-Brainfuck use cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with no runtime dependencies.
- Maintenance is aging—last release was 279 days ago, though the repository remains active and the package has been stable since its first release in 2017.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
last release 2025-11-08 (279 days) · last repo commit 2025-11-08 · 14 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 338,545 downloads/mo, #7,430 on PyPI
Alternatives
Verify before relying
pip install bfi
import bfi
with open('hello_world.b', 'r') as fh:
code = fh.read()
output = bfi.interpret(code, stdin='', buffer_stdout=True)
print(output)- Whether the package is actively maintained beyond bug fixes, or if development has effectively stalled
- Performance characteristics on modern Python versions beyond the CPython 2.7.14 benchmark mentioned in the documentation
What it is and what it does
bfi is a pure-Python interpreter for Brainfuck, an esoteric programming language. It works by first compiling Brainfuck source code into an intermediate bytecode form that collapses common instruction sequences—such as runs of cell pointer movements—into single optimized operations. This compilation step allows bfi to execute Brainfuck programs significantly faster than naive interpreters that process each source character individually.
The package supports both Python 2 and Python 3, has no external runtime dependencies, and can be used either from the command line (via the `bfi` command) or imported as a module in your own code. It includes configurable tape size (default 30,000 cells) and wrapping overflow/underflow behavior. The package ships with example Brainfuck programs demonstrating various algorithms and games.
Use it for
- Run Brainfuck programs from the command line without installing a separate interpreter or compiler
- Execute Brainfuck code programmatically from Python, capturing output or providing custom input
- Learn or teach esoteric language design and compilation techniques through a working pure-Python example
- Benchmark or compare Brainfuck interpreter performance across implementations
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to run or study Brainfuck code.
The package is lightweight, dependency-free, and genuinely faster than comparable pure-Python alternatives. However, maintenance is aging (last release 279 days ago), so treat it as stable but not actively developed. Not relevant for production systems or non-Brainfuck use cases.
Install
bfi on PyPI
Before you install
Low friction install with no runtime dependencies. Maintenance is aging—last release was 279 days ago, though the repository remains active and the package has been stable since its first release in 2017.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
Quickstart
pip install bfi
import bfi
with open('hello_world.b', 'r') as fh:
code = fh.read()
output = bfi.interpret(code, stdin='', buffer_stdout=True)
print(output)
Verify before relying
- Whether the package is actively maintained beyond bug fixes, or if development has effectively stalled
- Performance characteristics on modern Python versions beyond the CPython 2.7.14 benchmark mentioned in the documentation
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 279 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 338,545 / month, #7,430 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.11 |
Evidence: bfi-1.1.1-py2-none-any.whl; bfi-1.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “brainfuck interpreter”
- bfiA pure-Python interpreter for Brainfuck that compiles source code…
- cppyy-clingProvides Cling, an LLVM-based interactive C++ interpreter, packaged…
- python-discoveryDiscovers Python interpreters installed on your system across…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also formulas · ailment · pyvex · pyqir · dukpy · numba · lambdalib · Js2Py · Whoosh · tensorflow-intel