Name | pure-utils JSON |
Version |
0.8.0
JSON |
| download |
home_page | None |
Summary | Yet another python utilities, with the goal of collecting useful bicycles and crutches in one place. |
upload_time | 2024-05-06 02:47:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
bicycle
crutches
utilities
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pure-utils
![Build Status](https://github.com/p3t3rbr0/py3-pure-utils/actions/workflows/ci.yaml/badge.svg?branch=master)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pure-utils)
![PyPI Version](https://img.shields.io/pypi/v/pure-utils)
[![Code Coverage](https://codecov.io/gh/p3t3rbr0/py3-pure-utils/graph/badge.svg?token=283H0MAGUP)](https://codecov.io/gh/p3t3rbr0/py3-pure-utils)
[![Maintainability](https://api.codeclimate.com/v1/badges/14f70c48db708a419309/maintainability)](https://codeclimate.com/github/p3t3rbr0/py3-pure-utils/maintainability)
Yet another python utilities, with the goal of 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://p3t3rbr0.github.io/py3-pure-utils/)**.
# Available utilities
* [common](https://p3t3rbr0.github.io/py3-pure-utils/refs/common.html) - The common purpose utilities.
* [Singleton](https://p3t3rbr0.github.io/py3-pure-utils/refs/common.html#common.Singleton) - A metaclass that implements the singleton pattern for inheritors.
* [containers](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html) - Utilities for working with data containers (lists, dictionaries, tuples, sets, etc.).
* [bisect](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.bisect)(collection, /) - Bisect the list into two parts/halves based on the number of elements.
* [first](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.first)(collection, /) - Get the value of the first element from a homogeneous collection.
* [flatten](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.flatten)(collection, /) - Make the iterated collection a flat (single nesting level).
* [get_or_else](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.bisect)(collection, index[, default]) - Get value of element, and if it is missing, return the default value.
* [omit](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.omit)(container, keys, /) - Omit key-value pairs from the source dictionary, by keys sequence.
* [paginate](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.paginate)(collection, /, *, size) - Split the collection into page(s) according to the specified limit.
* [pick](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.pick)(container, keys, /) - Pick key-value pairs from the source dictionary, by keys sequence.
* [symmdiff](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.symmdiff)(s1, s2, /) - Obtain the symmetric difference of two sequences.
* [unpack](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.unpack)(container, attributes, /) - Unpack the values of container object into separate variables.
* [debug](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html) - Utilities for debugging and development.
* [around](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.around)(*[, before, after]) - Add additional behavior before and after execution of decorated function.
* [caller](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.caller)(*[, at_frame]) - Get the name of calling function/method (from current function/method context).
* [deltatime](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.deltatime)(*[, logger]) - Measure execution time of decorated function and print it to log.
* [profileit](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.profileit)(*[, logger, stack_size]) - Profile decorated function being with 'cProfile'.
* [profiler](https://p3t3rbr0.github.io/py3-pure-utils/refs/profiler.html) - Helper classes for working with the cProfile.
* [Profiler](https://p3t3rbr0.github.io/py3-pure-utils/refs/profiler.html#profiler.Profiler) - A class provides a simple interface for profiling code.
* [repeaters](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html) - Utilities for repeatedly execute custom logic.
* [Repeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.Repeater) - Base Repeater, implements a main logic, such as constructor and execute method.
* [ExceptionBasedRepeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.ExceptionBasedRepeater) - Repeater based on catching targeted exceptions.
* [PredicateBasedRepeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.PredicateBasedRepeater) - Repeater based on predicate function.
* [repeat](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.repeat)(repeater: Repeater) - Repeat wrapped function by `repeater` logic.
* [strings](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html) - Utilities for working with strings.
* [genstr](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.genstr)([length, is_uppercase]) - Generate ASCII-string with random letters.
* [gunzip](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.gzip)(compressed_string, /) - Compress string (or bytes string) with gzip compression level.
* [gzip](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.gunzip)(string, /, *[, level]) - Decompress bytes (earlier compressed with gzip) to string.
* [system](https://p3t3rbr0.github.io/py3-pure-utils/refs/system.html) - The system purpose utilities.
* [execute](https://p3t3rbr0.github.io/py3-pure-utils/refs/system.html#system.execute)(args, *[, input, timeout]) - Execute command into external process.
* [times](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html) - Utilities for working with datetime objects.
* [apply_tz](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.apply_tz)(dt[, tz]) - Apply timezone context to datetime object.
* [iso2format](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2format)(isostr, fmt, /) - Convert ISO-8601 datetime string into a string of specified format.
* [iso2dmy](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2dmy)(isostr, /) - Convert ISO-8601 datetime string into a string of DMY (DD.MM.YYYY) format.
* [iso2ymd](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2ymd)(isostr, /) - Convert ISO-8601 datetime string into a string of YMD (YYYY-MM-DD) format.
* [round_by](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.round_by)(dt, /, *, boundary) - Round datetime, discarding excessive precision.
# 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": "bicycle, crutches, utilities",
"author": null,
"author_email": "Peter Bro <p3t3rbr0@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c4/30/b7b410e4cb563317dc53465cacf9554cdfb1dc5af959da54f05d5407a713/pure_utils-0.8.0.tar.gz",
"platform": null,
"description": "# pure-utils\n\n![Build Status](https://github.com/p3t3rbr0/py3-pure-utils/actions/workflows/ci.yaml/badge.svg?branch=master)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pure-utils)\n![PyPI Version](https://img.shields.io/pypi/v/pure-utils)\n[![Code Coverage](https://codecov.io/gh/p3t3rbr0/py3-pure-utils/graph/badge.svg?token=283H0MAGUP)](https://codecov.io/gh/p3t3rbr0/py3-pure-utils)\n[![Maintainability](https://api.codeclimate.com/v1/badges/14f70c48db708a419309/maintainability)](https://codeclimate.com/github/p3t3rbr0/py3-pure-utils/maintainability)\n\nYet another python utilities, with the goal of 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://p3t3rbr0.github.io/py3-pure-utils/)**.\n\n# Available utilities\n\n* [common](https://p3t3rbr0.github.io/py3-pure-utils/refs/common.html) - The common purpose utilities.\n * [Singleton](https://p3t3rbr0.github.io/py3-pure-utils/refs/common.html#common.Singleton) - A metaclass that implements the singleton pattern for inheritors.\n* [containers](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html) - Utilities for working with data containers (lists, dictionaries, tuples, sets, etc.).\n * [bisect](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.bisect)(collection, /) - Bisect the list into two parts/halves based on the number of elements.\n * [first](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.first)(collection, /) - Get the value of the first element from a homogeneous collection.\n * [flatten](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.flatten)(collection, /) - Make the iterated collection a flat (single nesting level).\n * [get_or_else](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.bisect)(collection, index[, default]) - Get value of element, and if it is missing, return the default value.\n * [omit](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.omit)(container, keys, /) - Omit key-value pairs from the source dictionary, by keys sequence.\n * [paginate](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.paginate)(collection, /, *, size) - Split the collection into page(s) according to the specified limit.\n * [pick](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.pick)(container, keys, /) - Pick key-value pairs from the source dictionary, by keys sequence.\n * [symmdiff](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.symmdiff)(s1, s2, /) - Obtain the symmetric difference of two sequences.\n * [unpack](https://p3t3rbr0.github.io/py3-pure-utils/refs/containers.html#containers.unpack)(container, attributes, /) - Unpack the values of container object into separate variables.\n* [debug](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html) - Utilities for debugging and development.\n * [around](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.around)(*[, before, after]) - Add additional behavior before and after execution of decorated function.\n * [caller](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.caller)(*[, at_frame]) - Get the name of calling function/method (from current function/method context).\n * [deltatime](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.deltatime)(*[, logger]) - Measure execution time of decorated function and print it to log.\n * [profileit](https://p3t3rbr0.github.io/py3-pure-utils/refs/debug.html#debug.profileit)(*[, logger, stack_size]) - Profile decorated function being with 'cProfile'.\n* [profiler](https://p3t3rbr0.github.io/py3-pure-utils/refs/profiler.html) - Helper classes for working with the cProfile.\n * [Profiler](https://p3t3rbr0.github.io/py3-pure-utils/refs/profiler.html#profiler.Profiler) - A class provides a simple interface for profiling code.\n* [repeaters](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html) - Utilities for repeatedly execute custom logic.\n * [Repeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.Repeater) - Base Repeater, implements a main logic, such as constructor and execute method.\n * [ExceptionBasedRepeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.ExceptionBasedRepeater) - Repeater based on catching targeted exceptions.\n * [PredicateBasedRepeater](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.PredicateBasedRepeater) - Repeater based on predicate function.\n * [repeat](https://p3t3rbr0.github.io/py3-pure-utils/refs/repeaters.html#repeaters.repeat)(repeater: Repeater) - Repeat wrapped function by `repeater` logic.\n* [strings](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html) - Utilities for working with strings.\n * [genstr](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.genstr)([length, is_uppercase]) - Generate ASCII-string with random letters.\n * [gunzip](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.gzip)(compressed_string, /) - Compress string (or bytes string) with gzip compression level.\n * [gzip](https://p3t3rbr0.github.io/py3-pure-utils/refs/strings.html#strings.gunzip)(string, /, *[, level]) - Decompress bytes (earlier compressed with gzip) to string.\n* [system](https://p3t3rbr0.github.io/py3-pure-utils/refs/system.html) - The system purpose utilities.\n * [execute](https://p3t3rbr0.github.io/py3-pure-utils/refs/system.html#system.execute)(args, *[, input, timeout]) - Execute command into external process.\n* [times](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html) - Utilities for working with datetime objects.\n * [apply_tz](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.apply_tz)(dt[, tz]) - Apply timezone context to datetime object.\n * [iso2format](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2format)(isostr, fmt, /) - Convert ISO-8601 datetime string into a string of specified format.\n * [iso2dmy](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2dmy)(isostr, /) - Convert ISO-8601 datetime string into a string of DMY (DD.MM.YYYY) format.\n * [iso2ymd](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.iso2ymd)(isostr, /) - Convert ISO-8601 datetime string into a string of YMD (YYYY-MM-DD) format.\n * [round_by](https://p3t3rbr0.github.io/py3-pure-utils/refs/times.html#times.round_by)(dt, /, *, boundary) - Round datetime, discarding excessive precision.\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, with the goal of collecting useful bicycles and crutches in one place.",
"version": "0.8.0",
"project_urls": {
"Changelog": "https://github.com/p3t3rbr0/py3-pure-utils/blob/master/.docs/source/changelog.rst",
"Documentation": "https://p3t3rbr0.github.io/py3-pure-utils/",
"Homepage": "https://github.com/p3t3rbr0/py3-pure-utils",
"Issues": "https://github.com/p3t3rbr0/py3-pure-utils/issues",
"Repository": "https://github.com/p3t3rbr0/py3-pure-utils.git"
},
"split_keywords": [
"bicycle",
" crutches",
" utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "82e3da98d3c349937acbb1219c8acb6c3ff9dc3b04bda88998aa57e44e43b324",
"md5": "acdf87255aaca066643eb77f0e92e514",
"sha256": "d0a29f2eb0a12c79b389aac3199cc64bb389852b34802b97679fdca907361845"
},
"downloads": -1,
"filename": "pure_utils-0.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "acdf87255aaca066643eb77f0e92e514",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 17403,
"upload_time": "2024-05-06T02:47:05",
"upload_time_iso_8601": "2024-05-06T02:47:05.827157Z",
"url": "https://files.pythonhosted.org/packages/82/e3/da98d3c349937acbb1219c8acb6c3ff9dc3b04bda88998aa57e44e43b324/pure_utils-0.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c430b7b410e4cb563317dc53465cacf9554cdfb1dc5af959da54f05d5407a713",
"md5": "4d24052cab8e2520ea7346a532208343",
"sha256": "bddf172995ddb0d5058cc4a95f8b7966872a55022d00e4e7bcbea9f51c03df96"
},
"downloads": -1,
"filename": "pure_utils-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "4d24052cab8e2520ea7346a532208343",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 24782,
"upload_time": "2024-05-06T02:47:08",
"upload_time_iso_8601": "2024-05-06T02:47:08.166059Z",
"url": "https://files.pythonhosted.org/packages/c4/30/b7b410e4cb563317dc53465cacf9554cdfb1dc5af959da54f05d5407a713/pure_utils-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-06 02:47:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "p3t3rbr0",
"github_project": "py3-pure-utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pure-utils"
}