fatfs-ng
Enhanced Python wrapper around ChaN's FatFS library - Fork of fatfs-python with extended features.
What it is and what it does
fatfs-ng is a Python wrapper around ChaN's FatFS C library that lets you create and manipulate FAT filesystems entirely in memory or on disk without needing actual hardware. It's a fork of fatfs-python with extended features: directory traversal via walk(), file stat and existence checks, bulk copy operations, and full support for ESP32 wear-leveling filesystem images. The package ships as a compiled extension (Cython) across Python 3.8–3.14 on macOS, Linux, Windows, and ARM platforms.
You use it to build FAT filesystem images for embedded devices (especially ESP32), test filesystem logic in unit tests without real storage, or extract and inspect FAT images from devices. It has no runtime dependencies and integrates directly with Python's file I/O patterns—you can mount a filesystem, write or read files as if they were on disk, then unmount and serialize the whole thing to a binary blob for flashing to hardware.
Use it for:
- Create and populate ESP32 FAT filesystem images for PlatformIO builds without touching actual hardware.
- Extract and inspect FAT filesystem images downloaded from ESP32 devices for debugging or backup.
- Write unit tests that exercise filesystem logic (mkdir, write, delete, traverse) in memory without I/O overhead.
- Convert directory trees to FAT filesystem binaries for embedded systems with minimal storage.
- Validate FAT filesystem structure and contents before deployment to production devices.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
fatfs-ng wraps ChaN's FatFS library to create, mount, and manipulate FAT filesystems in memory or on disk, with extended directory traversal, file operations, and ESP32 wear-leveling support.
Yes, if you work with ESP32 or embedded FAT filesystems. The extended feature set (walk, stat, bulk copy) and ESP32 wear-leveling support make it substantially more usable than the original fatfs-python. Install friction is moderate but manageable; no runtime dependencies; MIT license is clean. Maintenance is aging (206 days since last release) but the repo is active and the package is marked Beta—suitable for production use if you accept that updates may be infrequent.
Install
fatfs-ng on PyPI
pip
pip install fatfs-nguv
uv add fatfs-ngpoetry
poetry add fatfs-ngInstalling fatfs-ng
Before you install
Medium install friction due to compiled wheels across many platforms (Python 3.10–3.14, macOS, Linux, Windows, ARM). Last release 206 days ago; repository active but aging maintenance signal.
License in practice
MIT license (permissive); no restrictions on commercial or private use, modification, or redistribution.
Quickstart
pip install fatfs-ng
from fatfs import RamDisk, create_extended_partition
storage = bytearray(1024 * 1024)
disk = RamDisk(storage, sector_size=512)
partition = create_extended_partition(disk)
partition.mkfs()
partition.mount()
partition.write_file("/test.txt", b"Hello")
partition.unmount()
Requires Python 3.8 or later; compiled extension module requires platform-specific wheel.
Verify before relying
- Real-world performance and stability with large FAT filesystems or high-frequency I/O.
- Completeness of ESP32 wear-leveling implementation relative to official Arduino FFat library.
- Whether 'aging' maintenance status reflects active development pauses or stable maturity.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 206 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 830,509/month — #4,948 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fatfs_ng-0.1.15-cp310-cp310-macosx_10_9_x86_64.whl; fatfs_ng-0.1.15-cp310-cp310-macosx_11_0_arm64.whl; fatfs_ng-0.1.15-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; fatfs_ng-0.1.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fatfs_ng-0.1.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; fatfs_ng-0.1.15-cp310-cp310-musllinux_1_2_i686.whl; fatfs_ng-0.1.15-cp310-cp310-musllinux_1_2_x86_64.whl; fatfs_ng-0.1.15-cp310-cp310-win_amd64.whl; fatfs_ng-0.1.15-cp310-cp310-win_arm64.whl; fatfs_ng-0.1.15-cp311-cp311-macosx_10_9_x86_64.whl; fatfs_ng-0.1.15-cp311-cp311-macosx_11_0_arm64.whl; fatfs_ng-0.1.15-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; fatfs_ng-0.1.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fatfs_ng-0.1.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; fatfs_ng-0.1.15-cp311-cp311-musllinux_1_2_i686.whl; fatfs_ng-0.1.15-cp311-cp311-musllinux_1_2_x86_64.whl; fatfs_ng-0.1.15-cp311-cp311-win_amd64.whl; fatfs_ng-0.1.15-cp311-cp311-win_arm64.whl; fatfs_ng-0.1.15-cp312-cp312-macosx_10_13_x86_64.whl; fatfs_ng-0.1.15-cp312-cp312-macosx_11_0_arm64.whl
Keywords: fatfs, fat, filesystem, embedded, esp32, platformio
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
provide-dirCreates a directory and all its parent…
permissive · top 15,000 on PyPI
xattrxattr is a Python wrapper for reading and…
permissive · top 5,000 on PyPI
morefsmorefs provides fsspec-based filesystem…
permissive · top 15,000 on PyPI
ftputilftputil provides a high-level FTP client…
permissive · top 15,000 on PyPI
littlefs-pythonlittlefs-python provides a Python interface to…
unclear · top 5,000 on PyPI
pyfakefspyfakefs mocks the Python file system modules…
permissive · top 5,000 on PyPI
universal-pathlibUniversal Pathlib provides a pathlib.Path-like…
permissive · top 1,000 on PyPI
esp-idf-nvs-partition-genGenerates binary NVS (Non-Volatile Storage)…
permissive · top 15,000 on PyPI
pathmagicProvides File and Dir classes that wrap…
permissive · top 15,000 on PyPI
xrootdProvides Python bindings to XRootD, a…
copyleft · top 5,000 on PyPI