crafts

Crafts is a set of custom build tools.


Keywords
build, tool
License
CC0-1.0
Install
pip install crafts==0.0.0

Documentation

Pithy

Pithy is a small library of Python 3.6 utilities. The various modules are mostly independent of each other.

The project is hosted at 'https://github.com/gwk/pithy'.

  • ansi Ansi console control strings for colors and other terminal IO.
  • buffer Buffer is an iterable class that lets you peek at and push back elements. Useful for parsing.
  • collection Collection utilities.
  • csv_utils CSV (comma-separated-value table files) utilities.
  • data Date and time utilities.
  • defaultlist DefaultList is a list subclass, analogous to defaultdict.
  • format Python format string parsing utilities.
  • fs File system utilities.
  • graph_utils Graph (as in network, not chart) utilities.
  • immutable Immutable object utilitise.
  • io IO utilites, including shorthand functions for printing to stdout and stderr.
  • iterable Iterable utilities.
  • json_utils JSON, JSONL (per-line JSON), and JSONS (concatenated/streamable JSON) utilities.
  • lex Easily create robust lexers from regular expressions.
  • meta Python metaprogramming tools (it's a slippery slope!).
  • path_encode Like urlencode, for creating sensible filesystem paths.
  • schema Compute the common structure for a collection of data examples.
  • sentinel Even sillier than NPM's left-pad.
  • sequence Sequence utilities.
  • string_utils String utilities.
  • tag_parse Simplistic parser for simple structural languages defined by start/end tags.
  • task Subprocess utilities.
  • transform Transformer creates a pipeline of functional stages for an input stream, through which each record is transformed and notable transformations are logged.
  • type_util Type utilities.
  • util Miscellaneous utilities.