Metadata-Version: 2.1
Name: kwutil
Version: 0.3.2
Summary: The kwutil module
Home-page: https://gitlab.kitware.com/computer-vision/kwutil
Author: Jon Crall
Author-email: jon.crall@kitware.com
License: Apache 2
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
Requires-Dist: ubelt >=1.3.6
Requires-Dist: ruamel.yaml >=0.17.22
Requires-Dist: python-dateutil >=2.8.2
Requires-Dist: rich >=12.3.0
Requires-Dist: progiter >=1.1.0
Requires-Dist: psutil >=5.7.3 ; python_version < "3.10" and python_version >= "3.9"
Requires-Dist: pint >=0.18 ; python_version < "3.10" and python_version >= "3.9"
Requires-Dist: psutil >=5.9.1 ; python_version < "3.11" and python_version >= "3.10"
Requires-Dist: pint >=0.18 ; python_version < "3.11" and python_version >= "3.10"
Requires-Dist: PyYAML >=6.0 ; python_version < "3.12"
Requires-Dist: psutil >=5.9.1 ; python_version < "3.12" and python_version >= "3.11"
Requires-Dist: pint >=0.18 ; python_version < "3.12" and python_version >= "3.11"
Requires-Dist: pint >=0.23 ; python_version < "3.13" and python_version >= "3.12"
Requires-Dist: psutil >=5.6.3 ; python_version < "3.9" and python_version >= "3.8"
Requires-Dist: pint >=0.18 ; python_version < "3.9" and python_version >= "3.8"
Requires-Dist: psutil >=5.9.6 ; python_version < "4.0" and python_version >= "3.12"
Requires-Dist: PyYAML >=6.0.1 ; python_version < "4.0" and python_version >= "3.12"
Requires-Dist: pint >=0.23 ; python_version < "4.0" and python_version >= "3.13"
Requires-Dist: lazy-loader >=0.1 ; python_version >= "3.7"
Provides-Extra: all
Requires-Dist: ubelt >=1.3.6 ; extra == 'all'
Requires-Dist: ruamel.yaml >=0.17.22 ; extra == 'all'
Requires-Dist: python-dateutil >=2.8.2 ; extra == 'all'
Requires-Dist: rich >=12.3.0 ; extra == 'all'
Requires-Dist: progiter >=1.1.0 ; extra == 'all'
Requires-Dist: xdoctest >=1.1.5 ; extra == 'all'
Requires-Dist: pytest-timeout >=1.4.2 ; extra == 'all'
Requires-Dist: fasteners >=0.16.3 ; extra == 'all'
Requires-Dist: text-unidecode >=1.3 ; extra == 'all'
Requires-Dist: pytimeparse >=1.1.8 ; extra == 'all'
Provides-Extra: all-strict
Requires-Dist: ubelt ==1.3.6 ; extra == 'all-strict'
Requires-Dist: ruamel.yaml ==0.17.22 ; extra == 'all-strict'
Requires-Dist: python-dateutil ==2.8.2 ; extra == 'all-strict'
Requires-Dist: rich ==12.3.0 ; extra == 'all-strict'
Requires-Dist: progiter ==1.1.0 ; extra == 'all-strict'
Requires-Dist: xdoctest ==1.1.5 ; extra == 'all-strict'
Requires-Dist: pytest-timeout ==1.4.2 ; extra == 'all-strict'
Requires-Dist: fasteners ==0.16.3 ; extra == 'all-strict'
Requires-Dist: text-unidecode ==1.3 ; extra == 'all-strict'
Requires-Dist: pytimeparse ==1.1.8 ; extra == 'all-strict'
Requires-Dist: numpy ==1.19.3 ; (python_version < "3.10" and python_version >= "3.6") and extra == 'all-strict'
Requires-Dist: psutil ==5.7.3 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all-strict'
Requires-Dist: coverage ==5.3.1 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all-strict'
Requires-Dist: pytest ==6.2.4 ; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == 'all-strict'
Requires-Dist: psutil ==5.9.1 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all-strict'
Requires-Dist: numpy ==1.21.6 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all-strict'
Requires-Dist: PyYAML ==6.0 ; (python_version < "3.12") and extra == 'all-strict'
Requires-Dist: psutil ==5.9.1 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all-strict'
Requires-Dist: numpy ==1.23.2 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all-strict'
Requires-Dist: pint ==0.23 ; (python_version < "3.13" and python_version >= "3.12") and extra == 'all-strict'
Requires-Dist: py-cpuinfo ==9.0.0 ; (python_version < "3.13" and python_version >= "3.6") and extra == 'all-strict'
Requires-Dist: psutil ==5.6.3 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all-strict'
Requires-Dist: coverage ==6.1.1 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all-strict'
Requires-Dist: psutil ==5.9.6 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all-strict'
Requires-Dist: PyYAML ==6.0.1 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all-strict'
Requires-Dist: numpy ==1.26.0 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all-strict'
Requires-Dist: pint ==0.23 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'all-strict'
Requires-Dist: py-cpuinfo ==9.0.0 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'all-strict'
Requires-Dist: coverage ==6.1.1 ; (python_version >= "3.10") and extra == 'all-strict'
Requires-Dist: pytest ==6.2.5 ; (python_version >= "3.10.0") and extra == 'all-strict'
Requires-Dist: pytest-cov ==3.0.0 ; (python_version >= "3.6.0") and extra == 'all-strict'
Requires-Dist: lazy-loader ==0.1 ; (python_version >= "3.7") and extra == 'all-strict'
Requires-Dist: numpy >=1.19.3 ; (python_version < "3.10" and python_version >= "3.6") and extra == 'all'
Requires-Dist: psutil >=5.7.3 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all'
Requires-Dist: pint >=0.18 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all'
Requires-Dist: coverage >=5.3.1 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'all'
Requires-Dist: pytest >=6.2.4 ; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == 'all'
Requires-Dist: psutil >=5.9.1 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all'
Requires-Dist: pint >=0.18 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all'
Requires-Dist: numpy >=1.21.6 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'all'
Requires-Dist: PyYAML >=6.0 ; (python_version < "3.12") and extra == 'all'
Requires-Dist: psutil >=5.9.1 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all'
Requires-Dist: pint >=0.18 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all'
Requires-Dist: numpy >=1.23.2 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'all'
Requires-Dist: pint >=0.23 ; (python_version < "3.13" and python_version >= "3.12") and extra == 'all'
Requires-Dist: py-cpuinfo >=9.0.0 ; (python_version < "3.13" and python_version >= "3.6") and extra == 'all'
Requires-Dist: psutil >=5.6.3 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all'
Requires-Dist: pint >=0.18 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all'
Requires-Dist: coverage >=6.1.1 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'all'
Requires-Dist: psutil >=5.9.6 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all'
Requires-Dist: PyYAML >=6.0.1 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all'
Requires-Dist: numpy >=1.26.0 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'all'
Requires-Dist: pint >=0.23 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'all'
Requires-Dist: py-cpuinfo >=9.0.0 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'all'
Requires-Dist: coverage >=6.1.1 ; (python_version >= "3.10") and extra == 'all'
Requires-Dist: pytest >=6.2.5 ; (python_version >= "3.10.0") and extra == 'all'
Requires-Dist: pytest-cov >=3.0.0 ; (python_version >= "3.6.0") and extra == 'all'
Requires-Dist: lazy-loader >=0.1 ; (python_version >= "3.7") and extra == 'all'
Provides-Extra: docs
Requires-Dist: sphinx >=5.0.1 ; extra == 'docs'
Requires-Dist: sphinx-autobuild >=2021.3.14 ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme >=1.0.0 ; extra == 'docs'
Requires-Dist: sphinxcontrib-napoleon >=0.7 ; extra == 'docs'
Requires-Dist: sphinx-autoapi >=1.8.4 ; extra == 'docs'
Requires-Dist: Pygments >=2.9.0 ; extra == 'docs'
Requires-Dist: myst-parser >=0.18.0 ; extra == 'docs'
Requires-Dist: sphinx-reredirects >=0.0.1 ; extra == 'docs'
Provides-Extra: docs-strict
Requires-Dist: sphinx ==5.0.1 ; extra == 'docs-strict'
Requires-Dist: sphinx-autobuild ==2021.3.14 ; extra == 'docs-strict'
Requires-Dist: sphinx-rtd-theme ==1.0.0 ; extra == 'docs-strict'
Requires-Dist: sphinxcontrib-napoleon ==0.7 ; extra == 'docs-strict'
Requires-Dist: sphinx-autoapi ==1.8.4 ; extra == 'docs-strict'
Requires-Dist: Pygments ==2.9.0 ; extra == 'docs-strict'
Requires-Dist: myst-parser ==0.18.0 ; extra == 'docs-strict'
Requires-Dist: sphinx-reredirects ==0.0.1 ; extra == 'docs-strict'
Provides-Extra: linting
Requires-Dist: flake8 >=5.0.0 ; extra == 'linting'
Provides-Extra: linting-strict
Requires-Dist: flake8 ==5.0.0 ; extra == 'linting-strict'
Provides-Extra: optional
Requires-Dist: fasteners >=0.16.3 ; extra == 'optional'
Requires-Dist: text-unidecode >=1.3 ; extra == 'optional'
Requires-Dist: pytimeparse >=1.1.8 ; extra == 'optional'
Provides-Extra: optional-strict
Requires-Dist: fasteners ==0.16.3 ; extra == 'optional-strict'
Requires-Dist: text-unidecode ==1.3 ; extra == 'optional-strict'
Requires-Dist: pytimeparse ==1.1.8 ; extra == 'optional-strict'
Requires-Dist: numpy ==1.19.3 ; (python_version < "3.10" and python_version >= "3.6") and extra == 'optional-strict'
Requires-Dist: numpy ==1.21.6 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'optional-strict'
Requires-Dist: numpy ==1.23.2 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'optional-strict'
Requires-Dist: py-cpuinfo ==9.0.0 ; (python_version < "3.13" and python_version >= "3.6") and extra == 'optional-strict'
Requires-Dist: numpy ==1.26.0 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'optional-strict'
Requires-Dist: py-cpuinfo ==9.0.0 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'optional-strict'
Requires-Dist: numpy >=1.19.3 ; (python_version < "3.10" and python_version >= "3.6") and extra == 'optional'
Requires-Dist: numpy >=1.21.6 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'optional'
Requires-Dist: numpy >=1.23.2 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'optional'
Requires-Dist: py-cpuinfo >=9.0.0 ; (python_version < "3.13" and python_version >= "3.6") and extra == 'optional'
Requires-Dist: numpy >=1.26.0 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'optional'
Requires-Dist: py-cpuinfo >=9.0.0 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'optional'
Provides-Extra: runtime
Requires-Dist: ubelt >=1.3.6 ; extra == 'runtime'
Requires-Dist: ruamel.yaml >=0.17.22 ; extra == 'runtime'
Requires-Dist: python-dateutil >=2.8.2 ; extra == 'runtime'
Requires-Dist: rich >=12.3.0 ; extra == 'runtime'
Requires-Dist: progiter >=1.1.0 ; extra == 'runtime'
Provides-Extra: runtime-strict
Requires-Dist: ubelt ==1.3.6 ; extra == 'runtime-strict'
Requires-Dist: ruamel.yaml ==0.17.22 ; extra == 'runtime-strict'
Requires-Dist: python-dateutil ==2.8.2 ; extra == 'runtime-strict'
Requires-Dist: rich ==12.3.0 ; extra == 'runtime-strict'
Requires-Dist: progiter ==1.1.0 ; extra == 'runtime-strict'
Requires-Dist: psutil ==5.7.3 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'runtime-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'runtime-strict'
Requires-Dist: psutil ==5.9.1 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'runtime-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'runtime-strict'
Requires-Dist: PyYAML ==6.0 ; (python_version < "3.12") and extra == 'runtime-strict'
Requires-Dist: psutil ==5.9.1 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'runtime-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'runtime-strict'
Requires-Dist: pint ==0.23 ; (python_version < "3.13" and python_version >= "3.12") and extra == 'runtime-strict'
Requires-Dist: psutil ==5.6.3 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'runtime-strict'
Requires-Dist: pint ==0.18 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'runtime-strict'
Requires-Dist: psutil ==5.9.6 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'runtime-strict'
Requires-Dist: PyYAML ==6.0.1 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'runtime-strict'
Requires-Dist: pint ==0.23 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'runtime-strict'
Requires-Dist: lazy-loader ==0.1 ; (python_version >= "3.7") and extra == 'runtime-strict'
Requires-Dist: psutil >=5.7.3 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'runtime'
Requires-Dist: pint >=0.18 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'runtime'
Requires-Dist: psutil >=5.9.1 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'runtime'
Requires-Dist: pint >=0.18 ; (python_version < "3.11" and python_version >= "3.10") and extra == 'runtime'
Requires-Dist: PyYAML >=6.0 ; (python_version < "3.12") and extra == 'runtime'
Requires-Dist: psutil >=5.9.1 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'runtime'
Requires-Dist: pint >=0.18 ; (python_version < "3.12" and python_version >= "3.11") and extra == 'runtime'
Requires-Dist: pint >=0.23 ; (python_version < "3.13" and python_version >= "3.12") and extra == 'runtime'
Requires-Dist: psutil >=5.6.3 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'runtime'
Requires-Dist: pint >=0.18 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'runtime'
Requires-Dist: psutil >=5.9.6 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'runtime'
Requires-Dist: PyYAML >=6.0.1 ; (python_version < "4.0" and python_version >= "3.12") and extra == 'runtime'
Requires-Dist: pint >=0.23 ; (python_version < "4.0" and python_version >= "3.13") and extra == 'runtime'
Requires-Dist: lazy-loader >=0.1 ; (python_version >= "3.7") and extra == 'runtime'
Provides-Extra: tests
Requires-Dist: xdoctest >=1.1.5 ; extra == 'tests'
Requires-Dist: pytest-timeout >=1.4.2 ; extra == 'tests'
Provides-Extra: tests-strict
Requires-Dist: xdoctest ==1.1.5 ; extra == 'tests-strict'
Requires-Dist: pytest-timeout ==1.4.2 ; extra == 'tests-strict'
Requires-Dist: coverage ==5.3.1 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'tests-strict'
Requires-Dist: pytest ==6.2.4 ; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == 'tests-strict'
Requires-Dist: coverage ==6.1.1 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'tests-strict'
Requires-Dist: coverage ==6.1.1 ; (python_version >= "3.10") and extra == 'tests-strict'
Requires-Dist: pytest ==6.2.5 ; (python_version >= "3.10.0") and extra == 'tests-strict'
Requires-Dist: pytest-cov ==3.0.0 ; (python_version >= "3.6.0") and extra == 'tests-strict'
Requires-Dist: coverage >=5.3.1 ; (python_version < "3.10" and python_version >= "3.9") and extra == 'tests'
Requires-Dist: pytest >=6.2.4 ; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == 'tests'
Requires-Dist: coverage >=6.1.1 ; (python_version < "3.9" and python_version >= "3.8") and extra == 'tests'
Requires-Dist: coverage >=6.1.1 ; (python_version >= "3.10") and extra == 'tests'
Requires-Dist: pytest >=6.2.5 ; (python_version >= "3.10.0") and extra == 'tests'
Requires-Dist: pytest-cov >=3.0.0 ; (python_version >= "3.6.0") and extra == 'tests'

The kwutil Module
=================


|GitlabCIPipeline| |GitlabCICoverage| |Pypi| |PypiDownloads| |ReadTheDocs|


+------------------+------------------------------------------------------+
| Read the docs    | https://kwutil.readthedocs.io                        |
+------------------+------------------------------------------------------+
| Gitlab (main)    | https://gitlab.kitware.com/computer-vision/kwutil    |
+------------------+------------------------------------------------------+
| Github (mirror)  | https://github.com/Kitware/kwutil                    |
+------------------+------------------------------------------------------+
| Pypi             | https://pypi.org/project/kwutil                      |
+------------------+------------------------------------------------------+

.. .. |ReadTheDocs|

The Kitware utility module.

This module is for small, pure-python utility functions. Dependencies are
allowed, but they must be small and highly standard packages (e.g. rich,
psutil, ruamel.yaml).

These were originally derived from `geowatch <https://gitlab.kitware.com/computer-vision/geowatch>`_ utilities.
Some of them were also from `xdev <https://github.com/Erotemic/xdev>`_.

In the case that a no-dependency utility in this library proves itself to be
extremely useful, it may be ported to `ubelt <https://github.com/Erotemic/ubelt>`_.


Current top-level API:

.. code:: python

    from kwutil import copy_manager
    from kwutil import fsops_managers
    from kwutil import partial_format
    from kwutil import process_context
    from kwutil import slugify_ext
    from kwutil import util_environ
    from kwutil import util_eval
    from kwutil import util_exception
    from kwutil import util_json
    from kwutil import util_locks
    from kwutil import util_parallel
    from kwutil import util_path
    from kwutil import util_pattern
    from kwutil import util_progress
    from kwutil import util_random
    from kwutil import util_resources
    from kwutil import util_time
    from kwutil import util_windows
    from kwutil import util_yaml

    from kwutil.fsops_managers import (CopyManager, MoveManager, DeleteManager,)
    from kwutil.util_environ import (envflag,)
    from kwutil.util_json import (Json,)
    from kwutil.util_parallel import (coerce_num_workers,)
    from kwutil.util_progress import (ProgressManager,)
    from kwutil.util_time import (datetime, timedelta,)
    from kwutil.util_yaml import (Yaml,)
    from kwutil.process_context import (ProcessContext,)

    __all__ = ['CopyManager', 'DeleteManager', 'Json', 'MoveManager',
               'ProcessContext', 'ProgressManager', 'Yaml', 'coerce_num_workers',
               'copy_manager', 'datetime', 'envflag', 'fsops_managers',
               'partial_format', 'process_context', 'slugify_ext', 'timedelta',
               'util_environ', 'util_eval', 'util_exception', 'util_json',
               'util_locks', 'util_parallel', 'util_path', 'util_pattern',
               'util_progress', 'util_random', 'util_resources', 'util_time',
               'util_windows', 'util_yaml']



.. |Pypi| image:: https://img.shields.io/pypi/v/kwutil.svg
    :target: https://pypi.python.org/pypi/kwutil

.. |PypiDownloads| image:: https://img.shields.io/pypi/dm/kwutil.svg
    :target: https://pypistats.org/packages/kwutil

.. |ReadTheDocs| image:: https://readthedocs.org/projects/kwutil/badge/?version=release
    :target: http://kwutil.readthedocs.io/en/release/

.. # See: https://ci.appveyor.com/project/jon.crall/kwutil/settings/badges
.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/py3s2d6tyfjc8lm3/branch/main?svg=true
   :target: https://ci.appveyor.com/project/jon.crall/kwutil/branch/main

.. |GitlabCIPipeline| image:: https://gitlab.kitware.com/computer-vision/kwutil/badges/main/pipeline.svg
   :target: https://gitlab.kitware.com/computer-vision/kwutil/-/jobs

.. |GitlabCICoverage| image:: https://gitlab.kitware.com/computer-vision/kwutil/badges/main/coverage.svg
    :target: https://gitlab.kitware.com/computer-vision/kwutil/commits/main
