Registry / devops / esp-idf-nvs-partition-gen

esp-idf-nvs-partition-gen

JSON →
library0.2.0pypypi✓ verified 85d ago

Python tool to generate NVS (Non-Volatile Storage) binary partition images for ESP-IDF projects. Extracts configuration from CSV files and produces binary blobs for flash. Current version 0.2.0, maintenance mode on PyPI, released when ESP-IDF requires updates.

pip install esp-idf-nvs-partition-gen
INSTALL
IMPORT
SIG · ESP-IDF-NVS-PARTIT
E
esp-idf-nvs-partition-gen
devopspythonv0.2.0
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.

NVSGenerator
✓ import esp_idf_nvs_partition_gen
✗ from esp_idf_nvs_partition_gen import NVSGenerator

Generate a binary NVS partition from a CSV. Adjust flash_size and page_size to match your ESP-IDF configuration.

from esp_idf_nvs_partition_gen import NVSGenerator import csv import io # Create a sample CSV in memory csv_data = """key,type,encoding,value my_string,namespace,,app my_key,data,string,hello""" csv_file = io.StringIO(csv_data) reader = csv.DictReader(csv_file) # Generate the NVS partition binary output_path = "partition.bin" generator = NVSGenerator(flash_size=0x400000, page_size=0x1000) generator.add_csv_reader(reader) generator.generate(output_path) print(f"Generated NVS partition at {output_path}")
esp-idf-nvs-partition-gen --version
Debug
Known issues
deprecatedThe module 'esp_idf_nvs_partition_gen' is deprecated in favor of ESP-IDF's built-in 'parttool.py' and 'nvs_partition_gen' utility. New projects should use the official ESP-IDF tools.
fix
Switch to ESP-IDF's nvs_partition_gen.py tool from the esp-idf repository.
affects: >=0.2.0
gotchaCSV column names must match exactly: 'key','type','encoding','value'. Missing or extra columns cause silent errors or no output.
fix
Ensure CSV header is: key,type,encoding,value (case-sensitive).
affects: all
gotchaNamespace entries must have 'type' set to 'namespace' and 'encoding' and 'value' left blank. Filling them incorrectly will break the NVS structure.
fix
For namespace rows, use: key=my_namespace, type=namespace, encoding=<empty>, value=<empty>.
affects: all
breakingThe 'NVSGenerator' class API changed in 0.2.0: 'add_csv_file' method was removed. Use 'add_csv_reader' with a CSV DictReader instead.
fix
Replace: generator.add_csv_file(path) -> reader = csv.DictReader(open(path)); generator.add_csv_reader(reader)
affects: >=0.2.0
Upgrade
Version history
0.2.0latest on PyPI · released May 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
esp-idf-nvs-partition-gen — pip install esp-idf-nvs-partition-gen · libregistry