pure-utils


Namepure-utils JSON
Version 0.9.2 PyPI version JSON
download
home_pageNone
SummaryYet another python utilities library for collecting useful bicycles and crutches in one place.
upload_time2024-10-27 15:58:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords utilities bicycle crutches
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pure-utils

![PyPI Version](https://img.shields.io/pypi/v/pure-utils)
![Development Status](https://img.shields.io/badge/status-5%20--%20Production/Stable-green)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pure-utils)
[![Downloads](https://static.pepy.tech/badge/pure-utils)](https://pepy.tech/project/pure-utils)
![PyPI - License](https://img.shields.io/pypi/l/pure-utils)

Yet another python utilities library for collecting useful bicycles and crutches in one place.

Main principles:

1. No third party dependencies (standart library only).
2. Mostly pure functions without side effects.
3. Interfaces with type annotations.
4. Comprehensive documentation with examples of use.
5. Full test coverage.

**For detail information read the [doc](https://pages.peterbro.su/py3-pure-utils/)**.

# Available utilities

* [common](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.common.html) - The common purpose utilities.
  * [Singleton](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.common.html#pure_utils.common.Singleton) - A metaclass, implements the singleton pattern for inheritors.
* [containers](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html) - Utilities for working with data containers (lists, dicts, tuples, sets, etc.).
  * [bisect](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.bisect)(collection, /) - Bisect the list into two parts/halves based on the number of elements.
  * [first](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.first)(collection, /) - Get the value of the first element from a homogeneous collection.
  * [flatten](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.flatten)(collection, /) - Make the iterated collection a flat (single nesting level).
  * [get_or_else](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.bisect)(collection, index[, default]) - Get value of element, and if it is missing, return the default value.
  * [omit](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.omit)(container, keys, /) - Omit key-value pairs from the source dictionary, by keys sequence.
  * [paginate](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.paginate)(collection, /, *, size) - Split the collection into page(s) according to the specified limit.
  * [pick](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.pick)(container, keys, /) - Pick key-value pairs from the source dictionary, by keys sequence.
  * [symmdiff](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.symmdiff)(collection1, collection2, /) - Obtain the symmetric difference of two sequences.
  * [unpack](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.unpack)(container, attributes, /) - Unpack the values of container object into separate variables.
* [debug](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html) - Utilities for debugging and development.
  * [around](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.around)(*[, before, after]) - Add additional behavior before and after execution of decorated function.
  * [caller](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.caller)(*[, at_frame]) - Get the name of calling function/method (from current function/method context).
  * [deltatime](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.deltatime)(*[, logger]) - Measure execution time of decorated function and print it to log.
  * [profileit](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.profileit)(*[, logger, stack_size]) - Profile decorated function being with 'cProfile'.
* [profiler](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.profiler.html) - Helper classes for working with the cProfile.
  * [Profiler](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.profiler.html#pure_utils.profiler.Profiler) - A class provides a simple interface for profiling code.
* [repeaters](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html) - Utilities for repeatedly execute custom logic.
  * [Repeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.Repeater) - Base Repeater, implements a main logic, such as constructor and execute method.
  * [ExceptionBasedRepeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.ExceptionBasedRepeater) - Repeater based on catching targeted exceptions.
  * [PredicateBasedRepeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.PredicateBasedRepeater) - Repeater based on predicate function.
  * [repeat](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.repeat)(repeater) - Repeat wrapped function by `repeater` logic.
* [strings](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html) - Utilities for working with strings.
  * [genstr](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.genstr)([length, is_uppercase]) - Generate ASCII-string with random letters.
  * [gunzip](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.gzip)(compressed_string, /) - Compress string (or bytes string) with gzip compression level.
  * [gzip](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.gunzip)(string, /, *[, level]) - Decompress bytes (earlier compressed with gzip) to string.
* [system](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.system.html) - The system purpose utilities.
  * [execute](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.system.html#pure_utils.system.execute)(args, *[, input, timeout]) - Execute command into external process.
* [times](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html) - Utilities for working with datetime objects.
  * [apply_tz](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.apply_tz)(dt[, tz]) - Apply timezone context to datetime object.
  * [iso2format](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2format)(isostr, fmt, /) - Convert ISO-8601 datetime string into a string of specified format.
  * [iso2dmy](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2dmy)(isostr, /) - Convert ISO-8601 datetime string into a string of DMY (DD.MM.YYYY) format.
  * [iso2ymd](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2ymd)(isostr, /) - Convert ISO-8601 datetime string into a string of YMD (YYYY-MM-DD) format.
  * [round_by](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.round_by)(dt, /, *, boundary) - Round datetime, discarding excessive precision.
* [types](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.types.html) - Helper module with common types.

# License

MIT License.

Copyright (c) 2024 Peter Bro <p3t3rbr0@gmail.com || peter@peterbro.su>

See LICENSE file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pure-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "utilities, bicycle, crutches",
    "author": null,
    "author_email": "Peter Bro <p3t3rbr0@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1a/63/6cfa5ea6772c0bb8e758b03928bf9475dbc6f37b0e6e4f666182bf3b340d/pure_utils-0.9.2.tar.gz",
    "platform": null,
    "description": "# pure-utils\n\n![PyPI Version](https://img.shields.io/pypi/v/pure-utils)\n![Development Status](https://img.shields.io/badge/status-5%20--%20Production/Stable-green)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pure-utils)\n[![Downloads](https://static.pepy.tech/badge/pure-utils)](https://pepy.tech/project/pure-utils)\n![PyPI - License](https://img.shields.io/pypi/l/pure-utils)\n\nYet another python utilities library for collecting useful bicycles and crutches in one place.\n\nMain principles:\n\n1. No third party dependencies (standart library only).\n2. Mostly pure functions without side effects.\n3. Interfaces with type annotations.\n4. Comprehensive documentation with examples of use.\n5. Full test coverage.\n\n**For detail information read the [doc](https://pages.peterbro.su/py3-pure-utils/)**.\n\n# Available utilities\n\n* [common](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.common.html) - The common purpose utilities.\n  * [Singleton](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.common.html#pure_utils.common.Singleton) - A metaclass, implements the singleton pattern for inheritors.\n* [containers](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html) - Utilities for working with data containers (lists, dicts, tuples, sets, etc.).\n  * [bisect](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.bisect)(collection, /) - Bisect the list into two parts/halves based on the number of elements.\n  * [first](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.first)(collection, /) - Get the value of the first element from a homogeneous collection.\n  * [flatten](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.flatten)(collection, /) - Make the iterated collection a flat (single nesting level).\n  * [get_or_else](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.bisect)(collection, index[, default]) - Get value of element, and if it is missing, return the default value.\n  * [omit](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.omit)(container, keys, /) - Omit key-value pairs from the source dictionary, by keys sequence.\n  * [paginate](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.paginate)(collection, /, *, size) - Split the collection into page(s) according to the specified limit.\n  * [pick](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.pick)(container, keys, /) - Pick key-value pairs from the source dictionary, by keys sequence.\n  * [symmdiff](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.symmdiff)(collection1, collection2, /) - Obtain the symmetric difference of two sequences.\n  * [unpack](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.containers.html#pure_utils.containers.unpack)(container, attributes, /) - Unpack the values of container object into separate variables.\n* [debug](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html) - Utilities for debugging and development.\n  * [around](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.around)(*[, before, after]) - Add additional behavior before and after execution of decorated function.\n  * [caller](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.caller)(*[, at_frame]) - Get the name of calling function/method (from current function/method context).\n  * [deltatime](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.deltatime)(*[, logger]) - Measure execution time of decorated function and print it to log.\n  * [profileit](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.debug.html#pure_utils.debug.profileit)(*[, logger, stack_size]) - Profile decorated function being with 'cProfile'.\n* [profiler](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.profiler.html) - Helper classes for working with the cProfile.\n  * [Profiler](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.profiler.html#pure_utils.profiler.Profiler) - A class provides a simple interface for profiling code.\n* [repeaters](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html) - Utilities for repeatedly execute custom logic.\n  * [Repeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.Repeater) - Base Repeater, implements a main logic, such as constructor and execute method.\n  * [ExceptionBasedRepeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.ExceptionBasedRepeater) - Repeater based on catching targeted exceptions.\n  * [PredicateBasedRepeater](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.PredicateBasedRepeater) - Repeater based on predicate function.\n  * [repeat](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.repeaters.html#pure_utils.repeaters.repeat)(repeater) - Repeat wrapped function by `repeater` logic.\n* [strings](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html) - Utilities for working with strings.\n  * [genstr](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.genstr)([length, is_uppercase]) - Generate ASCII-string with random letters.\n  * [gunzip](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.gzip)(compressed_string, /) - Compress string (or bytes string) with gzip compression level.\n  * [gzip](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.strings.html#pure_utils.strings.gunzip)(string, /, *[, level]) - Decompress bytes (earlier compressed with gzip) to string.\n* [system](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.system.html) - The system purpose utilities.\n  * [execute](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.system.html#pure_utils.system.execute)(args, *[, input, timeout]) - Execute command into external process.\n* [times](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html) - Utilities for working with datetime objects.\n  * [apply_tz](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.apply_tz)(dt[, tz]) - Apply timezone context to datetime object.\n  * [iso2format](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2format)(isostr, fmt, /) - Convert ISO-8601 datetime string into a string of specified format.\n  * [iso2dmy](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2dmy)(isostr, /) - Convert ISO-8601 datetime string into a string of DMY (DD.MM.YYYY) format.\n  * [iso2ymd](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.iso2ymd)(isostr, /) - Convert ISO-8601 datetime string into a string of YMD (YYYY-MM-DD) format.\n  * [round_by](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.times.html#pure_utils.times.round_by)(dt, /, *, boundary) - Round datetime, discarding excessive precision.\n* [types](https://pages.peterbro.su/py3-pure-utils/refs/pure_utils.types.html) - Helper module with common types.\n\n# License\n\nMIT License.\n\nCopyright (c) 2024 Peter Bro <p3t3rbr0@gmail.com || peter@peterbro.su>\n\nSee LICENSE file for more information.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Yet another python utilities library for collecting useful bicycles and crutches in one place.",
    "version": "0.9.2",
    "project_urls": {
        "Changelog": "https://pages.peterbro.su/py3-pure-utils/changelog.html",
        "Documentation": "https://pages.peterbro.su/py3-pure-utils/",
        "Homepage": "https://git.peterbro.su/peter/py3-pure-utils",
        "Issues": "https://git.peterbro.su/peter/py3-pure-utils/issues",
        "Repository": "https://git.peterbro.su/peter/py3-pure-utils.git"
    },
    "split_keywords": [
        "utilities",
        " bicycle",
        " crutches"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c09a444139160e4000a09ca27c2700c40776c05cc0a1271c9148c1afad1fd95f",
                "md5": "943eb610ea178d1b6e24818d2c4dca16",
                "sha256": "437f0d4a2cc403dc6b606264f94577e0de16e176b555431e9ae908d83712cc90"
            },
            "downloads": -1,
            "filename": "pure_utils-0.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "943eb610ea178d1b6e24818d2c4dca16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 15680,
            "upload_time": "2024-10-27T15:58:27",
            "upload_time_iso_8601": "2024-10-27T15:58:27.546972Z",
            "url": "https://files.pythonhosted.org/packages/c0/9a/444139160e4000a09ca27c2700c40776c05cc0a1271c9148c1afad1fd95f/pure_utils-0.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a636cfa5ea6772c0bb8e758b03928bf9475dbc6f37b0e6e4f666182bf3b340d",
                "md5": "6e212ef60af72609a1270b9054992ce2",
                "sha256": "d163da658f0809ff4fab8fd7511b8a2449166f2b72ba257ead055e75436a128d"
            },
            "downloads": -1,
            "filename": "pure_utils-0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6e212ef60af72609a1270b9054992ce2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 19862,
            "upload_time": "2024-10-27T15:58:29",
            "upload_time_iso_8601": "2024-10-27T15:58:29.397368Z",
            "url": "https://files.pythonhosted.org/packages/1a/63/6cfa5ea6772c0bb8e758b03928bf9475dbc6f37b0e6e4f666182bf3b340d/pure_utils-0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 15:58:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pure-utils"
}
        
Elapsed time: 4.34807s