Python utils for everyday use. See the docs at
MIT License
.. image:: https://travis-ci.org/webyneter/python-humble-utils.svg?branch=master :target: https://travis-ci.org/webyneter/python-humble-utils :alt: Build Status
.. image:: https://badgen.net/dependabot/webyneter/python-humble-utils/?icon=dependabot :target: https://badgen.net/dependabot/webyneter/python-humble-utils/?icon=dependabot :alt: dependabot
.. image:: https://codecov.io/gh/webyneter/python-humble-utils/branch/master/graph/badge.svg :target: https://codecov.io/gh/webyneter/python-humble-utils :alt: Coverage
.. image:: https://codeclimate.com/github/webyneter/python-humble-utils/badges/gpa.svg :target: https://codeclimate.com/github/webyneter/python-humble-utils :alt: Code Climate
.. image:: https://badge.fury.io/py/python-humble-utils.svg :target: https://pypi.python.org/pypi/python-humble-utils :alt: Latest Version
.. image:: https://img.shields.io/pypi/pyversions/python-humble-utils.svg :target: https://pypi.python.org/pypi/python-humble-utils :alt: Supported Python Versions
.. image:: https://readthedocs.org/projects/python-humble-utils/badge/?version=stable :target: http://python-humble-utils.readthedocs.io/en/stable/?badge=stable :alt: Documentation Status
.. image:: https://img.shields.io/badge/License-MIT-green.svg :target: https://opensource.org/licenses/MIT :alt: MIT License
.. image:: https://img.shields.io/gitter/room/webyneter/python-humble-utils.svg :target: https://gitter.im/webyneter/python-humble-utils?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge :alt: Join the chat at https://gitter.im/webyneter/python-humble-utils
Python utils for everyday use.
Documentation
_.open issues
_ before sending emails to the maintainers: You will get a much faster response!.. _open issues
: https://github.com/webyneter/python-humble-utils/issues/new
.. _Documentation
: https://python-humble-utils.readthedocs.io/en/stable/installation.html
py.test
_ fixtures and helpers... _py.test
: https://docs.pytest.org/en/stable/
.. code-block:: console
$ pip install python-humble-utils
or install from sources:
.. code-block:: console
$ python setup.py install
Refer to Installation
_ for detailed instructions.
.. _Installation
: https://python-humble-utils.readthedocs.io/en/stable/installation.html
.. code-block:: python
import os
from pathlib import Path
from python_humble_utils.filesystem import yield_file_paths
from python_humble_utils.strings import camel_or_pascal_case_to_snake_case
# ...
file_paths = yield_file_paths(
dir_path=Path("dir") / "with" / "scripts",
allowed_file_extensions=(".sh", ".bash"),
recursively=True
)
assert set(file_paths) == set(("s1.sh", "s2.bash", "s3.bash"))
s = camel_or_pascal_case_to_snake_case("camelCasedString")
assert s == "camel_cased_string"
s = camel_or_pascal_case_to_snake_case("PascalCasedString")
assert s == "pascal_cased_string"
# ...
Your contributions are very much welcome! Refer to Contributing
_ for more details.
.. _Contributing
: https://python-humble-utils.readthedocs.io/en/stable/contributing.html
All those using python-humble-utils
, including its codebase and project management ecosystem are expected to follow the Python Community Code of Conduct
_.
.. _Python Community Code of Conduct
: https://www.python.org/psf/codeofconduct/
This package was initially scaffolded via Cookiecutter
_ with audreyr/cookiecutter-pypackage
_ template.
.. _Cookiecutter
: https://github.com/audreyr/cookiecutter
.. _audreyr/cookiecutter-pypackage
: https://github.com/audreyr/cookiecutter-pypackage