Registry / devops / flametree

flametree

JSON →
library0.2.1pypypi✓ verified 85d ago

Flametree is a Python library for easy file and zip operations, providing a unified API to work with files and directories (including zip archives). Current version is 0.2.1. Release cadence is sporadic.

pip install flametree
INSTALL
IMPORT
SIG · FLAMETREE
F
flametree
devopspythonv0.2.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.

flametree
import flametree
from flametree import flametree
flametree is a module, not a class.

Open a local directory or zip archive, list contents, and write files.

import flametree # Work with local directory root = flametree.file_tree('.') # os.getcwd() for child in root.children: print(child.name) # Create files zip_target = flametree.file_tree('example.zip', 'w') # write to zip zip_target._file('hello.txt').write('Hello, world!') zip_target.close()
Debug
Known issues
gotchaWhen creating a zip file, a directory with the same name as the zip may be created if you don't set extension properly.
fix
Use the 'archive' type explicitly: flametree.file_tree('archive.zip', mode='w')
affects: all
gotchaThe API uses underscores in method names (e.g., _file, _dir) which may clash with Python naming conventions.
fix
Use the underscore-prefixed methods as intended; they are the public API.
affects: all
breakingVersion 0.2.0 changed how zip files are handled; previously the API was different.
fix
Check the CHANGELOG or migration guide on GitHub for changes.
affects: >=0.2.0
Errors
Common errors & fixes
AttributeError: module 'flametree' has no attribute 'file_tree'
Importing incorrectly, e.g., from flametree import flametree instead of import flametree.
fix
Use 'import flametree' then 'flametree.file_tree(...)'.
TypeError: 'NoneType' object is not callable
Trying to call a file tree object that wasn't properly opened, or missing close.
fix
Ensure you open with mode='w' for writing and call .close() when done.
Upgrade
Version history
0.2.1latest on PyPI · released May 9, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
flametree — pip install flametree · libregistry