Python utils for everyday use.
Project description
Python Humble Utils
Python utils for everyday use.
Please, open issues before sending emails to the maintainers: You will get a much faster response!
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.0
Breaking changes:
- The following functions have been removed as part of the Remove redundant utilities/utilities making no sense effort:
extract_file_name_with_extension
extract_file_name_and_extension
extract_file_dir_path
parse_tuple_from_string
generate_hex_uuid_4
generate_random_file_name_with_extension
get_class_name
get_class_qualname
Package structure has been altered.
Other changes:
Upgrade all dependencies to the latest versions to date.
v2.0.0
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-humble-utils-3.1.0.tar.gz
.
File metadata
- Download URL: python-humble-utils-3.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1228edc5abe380b5041e5ec85c5a0ee966270972035816c3fb8af3f1c5b87377 |
|
MD5 | fc0ac3257ee712f6ba0671509c396bbf |
|
BLAKE2b-256 | c87a792ec8e520bf82580d97fffc4efff1bcb1c48a8a90dd15123ec8e20cb7e5 |
File details
Details for the file python_humble_utils-3.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: python_humble_utils-3.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34784313c997a19491893e4f98923efa2cd9176642ad5d4b729ddb8137239bd8 |
|
MD5 | 205d48dc27e6e965c62e53697cdcb628 |
|
BLAKE2b-256 | ee55c331ecbf33c9aba370a4b77275e8dbb81d218325fa8497b30bb46cb608fa |