pycomfort


Namepycomfort JSON
Version 0.0.11 PyPI version JSON
download
home_page
SummaryPycomfort - Python helper methods to make life easier
upload_time2022-06-02 15:24:02
maintainer
docs_urlNone
authorantonkulaga (Anton Kualga)
requires_python
license
keywords python utils files
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# pycomfort
Utility methods for python code

So far contains only file/folder related methods but will be extended in the future

## files.py

The most important methods are:
* def children(p: Path) -> seq #lists files and subfolders as pyfunctional sequence
* def dirs(p: Path) -> seq #lists subfolders as pyfunctional sequence
* def files(p: Path) -> seq: #lists files as pyfunctional sequence
* def with_ext(p: Path, ext: str) -> seq: # filters files by extension
* def rename_files_with_dictionary(files_or_path: Union[seq, Path], dictionary: dict, test: bool = False): #renames files according to key value pairs mentioned in the dictionary
* def rename_files(files_or_path: Union[seq, Path], has: str, what: str, to: str): rename files that contain a substring
* def rename_not_files(files: seq, not_has: str, what: str, to: str) -> seq: #rename files that do NOT contain a substring
* def replace_in_file(file: Path, what: str, to: str, output: Optional[Path] = None): #replaces string in a file
* def replace_from_dict_in_file(file: Path, replacement: dict, output: Optional[Path] = None, verbose: bool = False) -> Path: # replaces the text in the file based on key-value pairs in the dictionary
* def tprint(p: Path, prefix: str = "", debug: bool = False): #prints the file tree

## executables

Executables are in comfort.py. At the moment it is the text replacement functions wrapped to CLI by click library:
* def replace(file: str, what: str, to: str, output: Optional[str]):
* def replace_dict(file: str, dictionary: str, output: Optional[str], verbose: bool = False):


# publishing to pip

You can use publish.sh script

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pycomfort",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,utils,files",
    "author": "antonkulaga (Anton Kualga)",
    "author_email": "<antonkulaga@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/09/2e/111c2efa79316607f58eb9fccdb6b74f9b6d92b79962b730fcda9915186e/pycomfort-0.0.11.tar.gz",
    "platform": null,
    "description": "\n# pycomfort\nUtility methods for python code\n\nSo far contains only file/folder related methods but will be extended in the future\n\n## files.py\n\nThe most important methods are:\n* def children(p: Path) -> seq #lists files and subfolders as pyfunctional sequence\n* def dirs(p: Path) -> seq #lists subfolders as pyfunctional sequence\n* def files(p: Path) -> seq: #lists files as pyfunctional sequence\n* def with_ext(p: Path, ext: str) -> seq: # filters files by extension\n* def rename_files_with_dictionary(files_or_path: Union[seq, Path], dictionary: dict, test: bool = False): #renames files according to key value pairs mentioned in the dictionary\n* def rename_files(files_or_path: Union[seq, Path], has: str, what: str, to: str): rename files that contain a substring\n* def rename_not_files(files: seq, not_has: str, what: str, to: str) -> seq: #rename files that do NOT contain a substring\n* def replace_in_file(file: Path, what: str, to: str, output: Optional[Path] = None): #replaces string in a file\n* def replace_from_dict_in_file(file: Path, replacement: dict, output: Optional[Path] = None, verbose: bool = False) -> Path: # replaces the text in the file based on key-value pairs in the dictionary\n* def tprint(p: Path, prefix: str = \"\", debug: bool = False): #prints the file tree\n\n## executables\n\nExecutables are in comfort.py. At the moment it is the text replacement functions wrapped to CLI by click library:\n* def replace(file: str, what: str, to: str, output: Optional[str]):\n* def replace_dict(file: str, dictionary: str, output: Optional[str], verbose: bool = False):\n\n\n# publishing to pip\n\nYou can use publish.sh script\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Pycomfort - Python helper methods to make life easier",
    "version": "0.0.11",
    "split_keywords": [
        "python",
        "utils",
        "files"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "40f05793de922e73c0eb8681e956bec1",
                "sha256": "8a08d58f04d07f646fda45e8bd0507eab4a18858cbfb546cdcbf796daf63de6b"
            },
            "downloads": -1,
            "filename": "pycomfort-0.0.11-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40f05793de922e73c0eb8681e956bec1",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 8805,
            "upload_time": "2022-06-02T15:24:00",
            "upload_time_iso_8601": "2022-06-02T15:24:00.352843Z",
            "url": "https://files.pythonhosted.org/packages/3b/9a/a38e242b14d8738ae78a0f4f39daa29e06fa2c838f3e0ff1758393564d26/pycomfort-0.0.11-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "74a57263d756143df9bdca8073bf6ea4",
                "sha256": "c76fd1f13bf64f7a81c5a7a631d5f197bee95f403f305336223dcc9302cded4d"
            },
            "downloads": -1,
            "filename": "pycomfort-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "74a57263d756143df9bdca8073bf6ea4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7932,
            "upload_time": "2022-06-02T15:24:02",
            "upload_time_iso_8601": "2022-06-02T15:24:02.404210Z",
            "url": "https://files.pythonhosted.org/packages/09/2e/111c2efa79316607f58eb9fccdb6b74f9b6d92b79962b730fcda9915186e/pycomfort-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-06-02 15:24:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pycomfort"
}
        
Elapsed time: 0.37485s