Python utils for everyday use.
Project description
Python Humble Utils
===================
.. image:: https://img.shields.io/pypi/v/python_humble_utils.svg
:target: https://pypi.python.org/pypi/python_humble_utils
:alt: PyPI
.. TODO .. image:: https://img.shields.io/pypi/status/python_humble_utils.svg
:target:
:alt:
.. TODO .. image:: https://img.shields.io/pypi/pyversions/python_humble_utils.svg
:target:
:alt:
.. image:: https://img.shields.io/travis/webyneter/python_humble_utils.svg
:target: https://travis-ci.org/webyneter/python_humble_utils
:alt: Travis CI
.. image:: https://pyup.io/repos/github/webyneter/python_humble_utils/shield.svg
:target: https://pyup.io/repos/github/webyneter/python_humble_utils/
:alt: pyup.io
.. image:: https://readthedocs.org/projects/python-humble-utils/badge/?version=latest
:target: https://python-humble-utils.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
.. image:: https://img.shields.io/badge/License-MIT-green.svg
:target: https://opensource.org/licenses/MIT
:alt: License: MIT
.. TODO: gitter
.. TODO: codecov
.. TODO: https://github.com/probot/stale
.. TODO: https://github.com/danger/danger
Python utils for everyday use.
* `Documentation`_.
* Please, `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/
Feature Areas
-------------
* File operations.
* File/directory paths extraction.
* File/directory paths randomization.
* String case convertions.
* Python class convenience shortcuts.
* `py.test`_ fixtures and helpers.
.. _py.test: https://docs.pytest.org/en/stable/
Installation
------------
.. 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.
.. TODO Refer to :ref:`installation`.
Usage
-----
.. code-block:: python
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 :ref:`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`_.
.. _`Python Community Code of Conduct`: https://www.python.org/psf/codeofconduct/
Acknowledgements
----------------
This package was scaffolded via Cookiecutter_ with `audreyr/cookiecutter-pypackage`_ template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
History
=======
0.1.0 (2017-06-18)
------------------
* First release on PyPI.
===================
.. image:: https://img.shields.io/pypi/v/python_humble_utils.svg
:target: https://pypi.python.org/pypi/python_humble_utils
:alt: PyPI
.. TODO .. image:: https://img.shields.io/pypi/status/python_humble_utils.svg
:target:
:alt:
.. TODO .. image:: https://img.shields.io/pypi/pyversions/python_humble_utils.svg
:target:
:alt:
.. image:: https://img.shields.io/travis/webyneter/python_humble_utils.svg
:target: https://travis-ci.org/webyneter/python_humble_utils
:alt: Travis CI
.. image:: https://pyup.io/repos/github/webyneter/python_humble_utils/shield.svg
:target: https://pyup.io/repos/github/webyneter/python_humble_utils/
:alt: pyup.io
.. image:: https://readthedocs.org/projects/python-humble-utils/badge/?version=latest
:target: https://python-humble-utils.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
.. image:: https://img.shields.io/badge/License-MIT-green.svg
:target: https://opensource.org/licenses/MIT
:alt: License: MIT
.. TODO: gitter
.. TODO: codecov
.. TODO: https://github.com/probot/stale
.. TODO: https://github.com/danger/danger
Python utils for everyday use.
* `Documentation`_.
* Please, `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/
Feature Areas
-------------
* File operations.
* File/directory paths extraction.
* File/directory paths randomization.
* String case convertions.
* Python class convenience shortcuts.
* `py.test`_ fixtures and helpers.
.. _py.test: https://docs.pytest.org/en/stable/
Installation
------------
.. 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.
.. TODO Refer to :ref:`installation`.
Usage
-----
.. code-block:: python
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 :ref:`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`_.
.. _`Python Community Code of Conduct`: https://www.python.org/psf/codeofconduct/
Acknowledgements
----------------
This package was scaffolded via Cookiecutter_ with `audreyr/cookiecutter-pypackage`_ template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
History
=======
0.1.0 (2017-06-18)
------------------
* 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
python-humble-utils-0.3.0.tar.gz
(24.2 kB
view hashes)
Close
Hashes for python-humble-utils-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c0fbe442e98e107d7d5f9c6e97ad24a2c7666bd17ecfd72d569c7b5e20ca26 |
|
MD5 | 3301291fa9cfcc0a1a68e04169c4dfad |
|
BLAKE2b-256 | 111ccc2fc3d001ef001220e08461598f2c9fe6bcb4722147ac682b14dfff9491 |