skillfed

fatfs-ng

Enhanced Python wrapper around ChaN's FatFS library - Fork of fatfs-python with extended features.

fatfs-ng v0.1.15 830.5K downloads/30d#4,948 on PyPI0
Permissive license AGING released

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-ng

uv

uv add fatfs-ng

poetry

poetry add fatfs-ng

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Software Development :: Embedded SystemsTopic :: Software Development :: LibrariesTopic :: System :: Filesystems

Tags

fat filesystem pythonfatfs wrapperesp32 filesystem imagein-memory fat diskfatfs mount read writeembedded filesystem toolsplatformio fatfs
embedded-systemsesp32filesystem-tools

More Libraries packages