Skip to content

lockss/lockss-pybasic

Repository files navigation

lockss-pybasic

Latest release: 0.2.0 (2026-03-18)

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

Modules

lockss.pybasic.cliutil

Command line utilities based on Click Extra, Cloup and Click.

  • 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.

About

Basic Python utilities

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages