{"id":19745743,"url":"https://github.com/jrast/littlefs-python","last_synced_at":"2026-02-09T18:09:28.195Z","repository":{"id":35147871,"uuid":"211698926","full_name":"jrast/littlefs-python","owner":"jrast","description":"Python wrapper for littlefs","archived":false,"fork":false,"pushed_at":"2026-02-08T14:07:31.000Z","size":253,"stargazers_count":53,"open_issues_count":3,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-02-08T20:44:44.235Z","etag":null,"topics":["embedded","filesystem","library","littlefs","python","python-3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrast.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-29T17:20:43.000Z","updated_at":"2026-02-08T14:07:35.000Z","dependencies_parsed_at":"2023-12-17T21:25:45.554Z","dependency_job_id":"597ad104-6ad9-4cd6-9206-059a8680a3cf","html_url":"https://github.com/jrast/littlefs-python","commit_stats":{"total_commits":54,"total_committers":8,"mean_commits":6.75,"dds":0.5740740740740741,"last_synced_commit":"698df1d6b1544b66254176ca45f489f3247a387d"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/jrast/littlefs-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrast%2Flittlefs-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrast%2Flittlefs-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrast%2Flittlefs-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrast%2Flittlefs-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrast","download_url":"https://codeload.github.com/jrast/littlefs-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrast%2Flittlefs-python/sbom","scorecard":{"id":536525,"data":{"date":"2025-08-11","repo":{"name":"github.com/jrast/littlefs-python","commit":"a54e0f5b1479a44ef0c4be5dfdc1cf1b1a6fb4c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/run-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/run-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jrast/littlefs-python/run-tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:93","Warn: pipCommand not pinned by hash: .github/workflows/run-tests.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/run-tests.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/run-tests.yml:32","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/deploy.yml:101"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T07:08:30.795Z","repository_id":35147871,"created_at":"2025-08-20T07:08:30.795Z","updated_at":"2025-08-20T07:08:30.795Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29274803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T17:15:22.002Z","status":"ssl_error","status_checked_at":"2026-02-09T17:14:42.395Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","filesystem","library","littlefs","python","python-3"],"created_at":"2024-11-12T02:11:10.165Z","updated_at":"2026-02-09T18:09:28.169Z","avatar_url":"https://github.com/jrast.png","language":"Python","readme":"===================\nlittlefs for Python\n===================\n\n.. image:: https://readthedocs.org/projects/littlefs-python/badge/?version=latest\n    :target: https://littlefs-python.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://badge.fury.io/py/littlefs-python.svg\n    :target: https://badge.fury.io/py/littlefs-python\n\nlittlefs-python provides a thin wrapper around littlefs_, a filesystem targeted for\nsmall embedded systems.\nThe wrapper provides a pythonic interface to the filesystem and allows the creation,\ninspection and modification of the filesystem or individual files.\nEven if this package uses Cython_, the goal is not to provide a high performance\nimplementation. Cython was chosen as an easy method is offered to generate the binding\nand the littlefs library in one step.\n\nQuick Examples\n==============\nLet's create a image ready to transfer to a flash memory using the pythonic interface:\n\n.. code:: python\n\n    from littlefs import LittleFS\n\n    # Initialize the File System according to your specifications\n    fs = LittleFS(block_size=512, block_count=256)\n\n    # Open a file and write some content\n    with fs.open('first-file.txt', 'w') as fh:\n        fh.write('Some text to begin with\\n')\n\n    # Dump the filesystem content to a file\n    with open('FlashMemory.bin', 'wb') as fh:\n        fh.write(fs.context.buffer)\n\nThe same can be done by using the more verbose C-Style API, which closely resembles the\nsteps which must be performed in C:\n\n.. code:: python\n\n    from littlefs import lfs\n\n    cfg = lfs.LFSConfig(block_size=512, block_count=256)\n    fs = lfs.LFSFilesystem()\n\n    # Format and mount the filesystem\n    lfs.format(fs, cfg)\n    lfs.mount(fs, cfg)\n\n    # Open a file and write some content\n    fh = lfs.file_open(fs, 'first-file.txt', 'w')\n    lfs.file_write(fs, fh, b'Some text to begin with\\n')\n    lfs.file_close(fs, fh)\n\n    # Dump the filesystem content to a file\n    with open('FlashMemory.bin', 'wb') as fh:\n        fh.write(cfg.user_context.buffer)\n\n\nInstallation\n============\n\nAs littlefs_ is bundled with the package you will need to install the correct version of\nthis package in successfully read or create images for your embedded system. If you start\nfrom scratch the latest version is recommended.\n\n.. csv-table::\n    :header: \"LittleFS Version\", \"Package Version\", \"LittleFS File System Version\"\n\n    2.11.2, v0.15.X, 2.0 / 2.1 [#f1]_\n    2.11.0, v0.14.X, 2.0 / 2.1 [#f1]_\n    2.10.0, v0.13.X, 2.0 / 2.1 [#f1]_\n    2.9.0, v0.12.X v0.11.X, 2.0 / 2.1 [#f1]_\n    2.9.0, v0.10.X, 2.0 / 2.1 [#f1]_\n    2.8.0, 0.8.X-0.9.X, 2.0 / 2.1 [#f1]_\n    2.7.0, 0.7.X, 2.0 / 2.1 [#f1]_\n    2.7.0, 0.6.X, 2.0 / 2.1 [#f1]_\n    2.6.1, 0.5.0, 2.1\n    2.2.1, 0.4.0, 2.0\n    2.2.1, 0.3.0, 2.0\n\n.. [#f1] See ``test/test_multiversion.py`` for examples.\n\n\nThis is as simple as it can be::\n\n    pip install littlefs-python\n\nAt the moment wheels (which require no build) are provided for the following platforms,\non other platforms the source package is used and a compiler is required:\n\n+ Linux: Python 3.7 - 3.13 / x86_64, arm64\n+ MacOS: Python 3.7 - 3.13 / x86_64, arm64\n+ Windows: Python 3.7 - 3.13 / 32- \u0026 64-bit\n\nCLI\n===\nlittlefs-python comes bundled with a command-line tool, ``littlefs-python``, that can be used to create and extract littlefs binary images.\n\n.. code:: console\n\n   $ littlefs-python --help\n   usage: littlefs-python [-h] [--version] {create,extract,list,repl} ...\n\n   Create, extract and inspect LittleFS filesystem images. Use one of the\n   commands listed below, the '-h' / '--help' option can be used on each command\n   to learn more about the usage.\n\n   optional arguments:\n     -h, --help            show this help message and exit\n     --version             show program's version number and exit\n\n   Available Commands:\n     {create,extract,list,repl}\n       create              Create LittleFS image from file/directory contents.\n       extract             Extract LittleFS image contents to a directory.\n       list                List LittleFS image contents.\n       repl                Inspect an existing LittleFS image through an interactive shell.\n\nTo create a littlefs binary image:\n\n.. code:: console\n\n   # Creates a 1-megabyte \"lfs.bin\" containing README.rst\n   $ littlefs-python create README.rst lfs.bin --fs-size=1mb --block-size=4096\n\n   # Creates a 1-megabyte \"lfs.bin\" containing the contents of the examples/ folder\n   $ littlefs-python create examples lfs.bin --fs-size=1mb --block-size=4096\n\nTo extract the contents of a littlefs binary image:\n\n.. code:: console\n\n   $ littlefs-python extract lfs.bin output/ --block-size=4096\n\nTo inspect or debug an existing image without extracting it first you can start a\nsimple REPL. It provides shell-like commands such as ``ls``, ``tree``, ``put``, ``get``\nand ``rm`` that operate directly on the image data:\n\n.. code:: console\n\n   $ littlefs-python repl lfs.bin --block-size=4096\n   Mounted remote littlefs.\n   littlefs\u003e ls\n   README.rst\n\nDevelopment Setup\n=================\n\nStart by checking out the source repository of littlefs-python::\n\n    git clone https://github.com/jrast/littlefs-python.git\n\nThe source code for littlefs is included as a submodule which must be\nchecked out after the clone::\n\n    cd \u003clittlefs-python\u003e\n    git submodule update --init\n\nthis ensures that the correct version of littlefs_ is cloned into\nthe littlefs folder. As a next step install the dependencies and install\nthe package::\n\n    pip install -r requirements.txt\n    pip install -e .\n\nIt's highly recommended to install the package in a virtual environment!\n\nDevelopment Hints\n-----------------\n\n- Test should be run before committing: ``pytest test``\n- Mypy is used for typechecking. Run it also on the tests to catch more issues:\n  ``mypy src test test/lfs``\n- Mypy stubs can be generated with ``stubgen src``. This will create a ``out`` directory\n  containing the generated stub files.\n\n\nCreating a new release\n======================\n\nNEW (with github deploy action):\n\n- Make sure the master branch is in the state you want it.\n- Create a new tag with the correct version number and push the tag to github\n- Start the \"Build and Deploy Package\" workflow for the created tag on github\n\n\nOUTDATED (without github deploy action):\n\n- Make sure the master branch is in the state you want it.\n- Create a tag with the new version number\n- Wait until all builds are completed. A new release should be created\n  automatically on github.\n- Build the source distribution with ``python setup.py sdist``.\n- Download all assets (using ``ci/download_release_files.py``).\n- Upload to pypi using twine: ``twine upload dist/*``.\n\n\n\n.. _littlefs: https://github.com/littlefs-project/littlefs\n.. _Cython: http://docs.cython.org/en/latest/index.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrast%2Flittlefs-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrast%2Flittlefs-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrast%2Flittlefs-python/lists"}