Registry / bfi
library1.1.1pypypi✓ verified 84d ago

A fast optimizing Brainfuck interpreter in pure Python. Current version 1.1.1, released under MIT license. Development appears stable with infrequent releases.

pip install bfi
INSTALL
IMPORT
SIG · BFI
B
bfi
pythonv1.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

interpret
from bfi import interpret
from bfi import interpreter
Common misspelling; correct function is 'interpret' not 'interpreter'
execute
from bfi import execute
from bfi.bfi import execute
bfi is a single module; do not import from submodule 'bfi.bfi'

Run a Brainfuck program using the 'interpret' function, which returns output as a string.

from bfi import interpret # Simple Brainfuck program that prints 'Hello' program = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." output = interpret(program) print(output)
bfi --version
Debug
Known issues
breakingIn v1.1.0, the 'time_limit' argument was removed from bfi.execute. Calling execute with time_limit will raise an error.
fix
Remove the time_limit argument; use a different approach (e.g., signal) to limit execution time.
affects: >=1.1.0
deprecatedThe 'bin/bfi' script was removed in v1.1.0. Use 'python -m bfi' instead.
fix
Run 'python -m bfi' instead of calling the script directly.
affects: >=1.1.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'bfi.bfi'
Incorrect import path (e.g., from bfi.bfi import interpret).
fix
Use 'from bfi import interpret' (module is bfi, not bfi.bfi).
AttributeError: module 'bfi' has no attribute 'interpret'
Typo in function name or old version (<1.0.3) may lack the function.
fix
Check spelling: 'interpret' not 'interpreter'. Update to latest version: pip install --upgrade bfi.
TypeError: execute() got an unexpected keyword argument 'time_limit'
Using time_limit argument which was removed in v1.1.0.
fix
Remove time_limit argument; use external timeout mechanism.
Upgrade
Version history
1.1.1latest on PyPI · released Nov 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
bfi — pip install bfi · libregistry