Metadata-Version: 2.4
Name: lockss-pybasic
Version: 0.3.0.dev9
Summary: Basic Python utilities
License: BSD-3-Clause
License-File: LICENSE
Author: Thib Guicherd-Callin
Author-email: thib@cs.stanford.edu
Maintainer: Thib Guicherd-Callin
Maintainer-email: thib@cs.stanford.edu
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries
Requires-Dist: annotated-types (>=0.7.0,<0.8.0)
Requires-Dist: click-extra (>=7.18.0,<7.19.0)
Requires-Dist: pydantic (>=2.13.0,<2.14.0)
Project-URL: Repository, https://github.com/lockss/lockss-pybasic
Description-Content-Type: text/x-rst

==============
lockss-pybasic
==============

.. |RELEASE| replace:: 0.3.0-dev9

.. |RELEASE_DATE| replace:: NOT YET RELEASED

**Latest release:** |RELEASE| (|RELEASE_DATE|)

``lockss-pybasic`` provides basic utilities for various LOCKSS projects written in Python.

-------
Modules
-------

``lockss.pybasic.cliutil``
   Command line utilities based on `Click Extra <https://kdeldycke.github.io/click-extra>`_, `Cloup <https://cloup.readthedocs.io/>`_ and `Click <https://click.palletsprojects.com/>`_.

   *  ``click_path()``: a ``click.Path`` utility.

   *  ``PositiveInt``, ``NonNegativeInt``, ``NegativeInt``, ``NonPositiveInt``, ``UInt16``: ``click.ParamType`` integer types.

   *  ``compose_decorators()``: a decorator utility.

   *  ``make_table_format_option()``: a remix of ``click_extra.table_format_option`` that is not attached to the top-level command.

   *  ``make_extra_context_settings()``: a custom ``click_extra.ExtraContext``.

``lockss.pybasic.errorutil``
   Error and exception utilities.

   *  ``InternalError`` is a no-arg subclass of ``RuntimeError``.

``lockss.pybasic.fileutil``
   File and path utilities.

   *  ``file_lines`` returns the non-empty lines of a file stripped of comments that begin with ``#`` and run to the end of a line.

   *  ``path`` takes a string or ``PurePath`` and returns a ``Path`` for which ``Path.expanduser()`` and ``Path.resolve()`` have been called.

-------------
Release Notes
-------------

See `<CHANGELOG.rst>`_.

----------
Unit Tests
----------

Run ``python -m unittest discover tests`` at the root of the project tree (where there is a directory called ``tests``).

