models-files-manager


Namemodels-files-manager JSON
Version 1.0.5 PyPI version JSON
download
home_page
SummaryManage saved models files, encode fields into filenames
upload_time2023-09-05 20:13:49
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Ram Nathaniel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords deep learning models files manager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Models Files Manager

The Models Files Manager is a simple tool that helps you keep track of saved models (PyTorch/Keras/Onnx/etc.) saved on the hard drive. You can set up a number of fields, that will get encoded into the file names, and query the files saved.

The Models Files Manager helps you avoid illegal chars in the paths, and easily retrive saved files for loading.

## Installation

You can install the Models Files Manager from [PyPI](https://pypi.org/project/models-files-manager/):

    python -m pip install models-files-manager

The manager is supported and tested on Python 3.8 and above.

## How to use

To use the Models Files Manager, in your own Python code, by importing from the `models_files_manager` package:

    >>> from models_files_manager import ModelsFilesManager
    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
    >>> models_file_names = manager.get_model_files(lambda d: d['field1'] == 'value1')

Or to create a new file name:

    >>> from models_files_manager import ModelsFilesManager
    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
    >>> file_name = manager.get_file_name({'field1': 'value1', 'field2': 'value2'})

Or get the field values of a specific model, from the path:

    >>> from models_files_manager import ModelsFilesManager
    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
    >>> fields = manager.get_fields_values('model file name')
    >>> print(fields['field1'])

To directly encode/decode into strings to a path-safe format:
    
    >>> from models_files_manager import ModelsFilesManager
    >>> safe_string = ModelsFilesManager.path_escape(string)
    >>> orig_string = ModelsFilesManager.path_decode(safe_string)

Free to use in any way, open source or commercial - see attached license.

Happy training!
Ram Nathaniel, 2023

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "models-files-manager",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "deep,learning,models,files,manager",
    "author": "",
    "author_email": "Ram Nathaniel <ram.nathaniel@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/5b/7e/4ffcc15260712fe837f2ac3c53d13ea309d52bf7df5be42b847636b8f52e/models-files-manager-1.0.5.tar.gz",
    "platform": null,
    "description": "# Models Files Manager\n\nThe Models Files Manager is a simple tool that helps you keep track of saved models (PyTorch/Keras/Onnx/etc.) saved on the hard drive. You can set up a number of fields, that will get encoded into the file names, and query the files saved.\n\nThe Models Files Manager helps you avoid illegal chars in the paths, and easily retrive saved files for loading.\n\n## Installation\n\nYou can install the Models Files Manager from [PyPI](https://pypi.org/project/models-files-manager/):\n\n    python -m pip install models-files-manager\n\nThe manager is supported and tested on Python 3.8 and above.\n\n## How to use\n\nTo use the Models Files Manager, in your own Python code, by importing from the `models_files_manager` package:\n\n    >>> from models_files_manager import ModelsFilesManager\n    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')\n    >>> models_file_names = manager.get_model_files(lambda d: d['field1'] == 'value1')\n\nOr to create a new file name:\n\n    >>> from models_files_manager import ModelsFilesManager\n    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')\n    >>> file_name = manager.get_file_name({'field1': 'value1', 'field2': 'value2'})\n\nOr get the field values of a specific model, from the path:\n\n    >>> from models_files_manager import ModelsFilesManager\n    >>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')\n    >>> fields = manager.get_fields_values('model file name')\n    >>> print(fields['field1'])\n\nTo directly encode/decode into strings to a path-safe format:\n    \n    >>> from models_files_manager import ModelsFilesManager\n    >>> safe_string = ModelsFilesManager.path_escape(string)\n    >>> orig_string = ModelsFilesManager.path_decode(safe_string)\n\nFree to use in any way, open source or commercial - see attached license.\n\nHappy training!\nRam Nathaniel, 2023\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Ram Nathaniel  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Manage saved models files, encode fields into filenames",
    "version": "1.0.5",
    "project_urls": {
        "documentation": "https://ramnathaniel.github.io/models-files-manager",
        "repository": "https://github.com/RamNathaniel/models-files-manager"
    },
    "split_keywords": [
        "deep",
        "learning",
        "models",
        "files",
        "manager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e731f1c770ec3a3e6f97fb37822d7cb692a9c6e4d875a3082f9a635cd355795",
                "md5": "bda97a183c258b349849a856395420f2",
                "sha256": "f0501eea17b61a7452a8c3ac9f7715343eb595fe765c3486735fefa12c27213c"
            },
            "downloads": -1,
            "filename": "models_files_manager-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bda97a183c258b349849a856395420f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5314,
            "upload_time": "2023-09-05T20:13:45",
            "upload_time_iso_8601": "2023-09-05T20:13:45.327656Z",
            "url": "https://files.pythonhosted.org/packages/5e/73/1f1c770ec3a3e6f97fb37822d7cb692a9c6e4d875a3082f9a635cd355795/models_files_manager-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b7e4ffcc15260712fe837f2ac3c53d13ea309d52bf7df5be42b847636b8f52e",
                "md5": "6c204cd1d9b31148522d862a7f9281ed",
                "sha256": "c9e84a74a60b30f196aedd8ad4bf34c4f4356e95e5c665069cc2245c221e8959"
            },
            "downloads": -1,
            "filename": "models-files-manager-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "6c204cd1d9b31148522d862a7f9281ed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4986,
            "upload_time": "2023-09-05T20:13:49",
            "upload_time_iso_8601": "2023-09-05T20:13:49.243179Z",
            "url": "https://files.pythonhosted.org/packages/5b/7e/4ffcc15260712fe837f2ac3c53d13ea309d52bf7df5be42b847636b8f52e/models-files-manager-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-05 20:13:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RamNathaniel",
    "github_project": "models-files-manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "models-files-manager"
}
        
Elapsed time: 0.11238s