skip to navigation
skip to content

python-humble-utils 2.0.0

Python utils for everyday use.

Python Humble Utils

Python utils for everyday use.

Feature Areas

  • File operations.
  • File/directory paths extraction.
  • File/directory paths randomization.
  • String case conversions.
  • Python class convenience shortcuts.
  • py.test fixtures and helpers.

Installation

$ pip install python-humble-utils

or install from sources:

$ python setup.py install

Refer to Installation for detailed instructions.

Usage

import os

from python_humble_utils.commands import (
    yield_file_paths,
    camel_or_pascal_case_to_snake_case
)


# ...


file_paths = yield_file_paths(dir_path=os.path.join('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'


# ...

Contributing

Your contributions are very much welcome! Refer to Contributing for more details.

Code of Conduct

All those using python-humble-utils, including its codebase and project management ecosystem are expected to follow the Python Community Code of Conduct.

Acknowledgements

This package was scaffolded via Cookiecutter with audreyr/cookiecutter-pypackage template.

 
File Type Py Version Uploaded on Size
python-humble-utils-2.0.0.tar.gz (md5) Source 2017-10-24 15KB
python_humble_utils-2.0.0-py2.py3-none-any.whl (md5) Python Wheel 3.5 2017-10-24 9KB