Skip to main content

Python utils for everyday use.

Project description

Python Humble Utils

Build Status dependabot Coverage Code Climate Latest Version Supported Python Versions Documentation Status MIT License Join the chat at https://gitter.im/webyneter/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 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"

# ...

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 initially scaffolded via Cookiecutter with audreyr/cookiecutter-pypackage template.

History

v3.0.1

v3.0.1.

v3.0.0

v3.0.0.

Breaking changes:

Other changes:

v2.0.0

v2.0.0.

v1.0.4

v1.0.4.

v1.0.3

v1.0.3.

v1.0.2

v1.0.2.

v1.0.1

v1.0.1.

v1.0.0

v1.0.0.

v0.5.0

v0.5.0.

v0.4.0

v0.4.0.

v0.3.0

v0.3.0.

v0.2.0

v0.2.0.

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-humble-utils-3.1.0.tar.gz (16.6 kB view hashes)

Uploaded Source

Built Distribution

python_humble_utils-3.1.0-py2.py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page