Skip to main content

Python tools to create, view, and extract littleFS filesystem images

Project description

littlefs-tools

Build Result PIP Version

Tools to create, view, and extract littleFS filesystem images.

Though distributed as a Python module, these tools are intended to be executed as command-line tools. The invocation commands are provided below.

Attribution: littlefs_tools is built on top of littlefs-python. To use littleFS functionality within your Python code, use littlefs-python directly.

Installation

pip install littlefs_tools

Requires Python 3.9 or later.

Usage

Unified CLI

All commands are available under a single littlefs command:

littlefs create -s <source_dir> -i <image_file> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v]
littlefs list -i <image_file> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v]
littlefs extract -i <image_file> -d <destination> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-f] [-v]

Run littlefs --help for full usage, or littlefs <command> --help for command-specific help.

littlefs create

Package a directory into a littleFS binary image.

usage: littlefs create [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v] -s SOURCE -i IMAGE

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCK_SIZE, --block_size BLOCK_SIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCK_COUNT, --block_count BLOCK_COUNT
                        block count of the LFS image (defaults to 64)
  -i IMAGE, --image IMAGE
                        output image file name
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts
                        (defaults to 0). Hex values are supported (e.g. 0x80000)
  -v, --verbose         enable verbose/debug output

required arguments:
  -s SOURCE, --source SOURCE
                        source directory path

littlefs list

Display the file tree of a littleFS binary image.

usage: littlefs list [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v] -i IMAGE

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCK_SIZE, --block_size BLOCK_SIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCK_COUNT, --block_COUNT BLOCK_COUNT
                        block count of the LFS image (defaults to 64)
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts
                        (defaults to 0). Hex values are supported (e.g. 0x80000)
  -v, --verbose         enable verbose/debug output

required arguments:
  -i IMAGE, --image IMAGE
                        image file name

littlefs extract

Extract all files from a littleFS binary image to a directory.

usage: littlefs extract [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-f] [-v] -i IMAGE -d DESTINATION

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCK_SIZE, --block_size BLOCK_SIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCK_COUNT, --block_count BLOCK_COUNT
                        block count of the LFS image (defaults to 64)
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts
                        (defaults to 0). Hex values are supported (e.g. 0x80000)
  -f, --force           force extract even if destination folder is not empty
  -v, --verbose         enable verbose/debug output

required arguments:
  -i IMAGE, --image IMAGE
                        image file name
  -d DESTINATION, --destination DESTINATION
                        destination directory to extract the contents into

Legacy Commands

The original standalone commands are still available for backward compatibility:

littlefs_create -s <source_dir> -i <image_file> [options]
littlefs_list -i <image_file> [options]
littlefs_extract -i <image_file> -d <destination> [options]

Building the Package Locally

Install build tools and build:

pip install build
python -m build

This produces both a source distribution and a wheel in the dist/ directory.

Install the built wheel:

pip install dist/littlefs_tools-*.whl

Contributing

See CONTRIBUTING.md for development setup, testing, and pull request guidelines.

Changelog

See CHANGELOG.md for a list of changes in each release.


littlefs-tools | ലിറ്റിലെഫ്എസ്-ഉപകരണങ്ങൾ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

littlefs_tools-1.2.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

littlefs_tools-1.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file littlefs_tools-1.2.0.tar.gz.

File metadata

  • Download URL: littlefs_tools-1.2.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for littlefs_tools-1.2.0.tar.gz
Algorithm Hash digest
SHA256 443a270a21971f31e32edad37c6dd9df61d3b3cbc46f33c4e2ca501de29892da
MD5 64f4baf9e143b20edbf4ad04ffddfa0c
BLAKE2b-256 99760fcd80ac68b1fc2cfb2a0f7f1e3f4359b1e5467cd7da5d56651641894cb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for littlefs_tools-1.2.0.tar.gz:

Publisher: publish.yml on vppillai/littlefs_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file littlefs_tools-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: littlefs_tools-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for littlefs_tools-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92d4ca8974e489c16234d0e95b7ff47845ff32423d7e201e720f2bc4ab872228
MD5 2aa640b42e95c0322a8f7ede58e05040
BLAKE2b-256 bc4fc1ff85528aae6f11e3ce540ee029cc2bf140b9e2578095a6d2e0324ca893

See more details on using hashes here.

Provenance

The following attestation bundles were made for littlefs_tools-1.2.0-py3-none-any.whl:

Publisher: publish.yml on vppillai/littlefs_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page