Metadata-Version: 2.4
Name: pyaux
Version: 4.0.0
Summary: A collection of small useful helpers.
Author-email: HoverHell <hoverhell@gmail.com>
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
Classifier: Development Status :: 6 - Mature
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Requires-Dist: black ; extra == "dev"
Requires-Dist: isort ; extra == "dev"
Requires-Dist: Cython ; extra == "known"
Requires-Dist: django ; extra == "known"
Requires-Dist: line_profiler ; extra == "known"
Requires-Dist: pandas ; extra == "known"
Requires-Dist: Pygments ; extra == "known"
Requires-Dist: pylzma ; extra == "known"
Requires-Dist: build ; extra == "known"
Requires-Dist: twine ; extra == "known"
Requires-Dist: ipdb ; extra == "recommended"
Requires-Dist: ipython ; extra == "recommended"
Requires-Dist: orjson ; extra == "recommended"
Requires-Dist: PyYAML ; extra == "recommended"
Requires-Dist: toml ; extra == "recommended"
Requires-Dist: requests[ssl] ; extra == "req"
Requires-Dist: autoflake>=1.5.3 ; extra == "tests"
Requires-Dist: docutils>=0.19 ; extra == "tests"
Requires-Dist: flake8>=5.0.4 ; extra == "tests"
Requires-Dist: flake8-future-import>=0.4.7 ; extra == "tests"
Requires-Dist: flake8-print>=5.0.0 ; extra == "tests"
Requires-Dist: isort>=5.10.1 ; extra == "tests"
Requires-Dist: mock>=4.0.3 ; extra == "tests"
Requires-Dist: mypy>=0.990 ; extra == "tests"
Requires-Dist: pep8-naming>=0.13.2 ; extra == "tests"
Requires-Dist: Pygments>=2.13.0 ; extra == "tests"
Requires-Dist: pylint>=2.15.5 ; extra == "tests"
Requires-Dist: pyproject-flake8>=5.0.4.post1 ; extra == "tests"
Requires-Dist: pytest>=7.2.0 ; extra == "tests"
Requires-Dist: pytest-asyncio>=0.20.1 ; extra == "tests"
Requires-Dist: pytest-cov>=4.0.0 ; extra == "tests"
Requires-Dist: pytest-html>=3.2.0 ; extra == "tests"
Requires-Dist: requests>=2.28.1 ; extra == "tests"
Requires-Dist: tox>=3.27.0 ; extra == "tests"
Project-URL: Home, https://gitlab.com/hoverhell/pyaux
Provides-Extra: dev
Provides-Extra: known
Provides-Extra: recommended
Provides-Extra: req
Provides-Extra: tests

pyaux
=====

Personal collection of helpers and often-useful snippets for Python

Install the latest version with
`pip install -U "git+https://gitlab.com/hoverhell/pyaux.git#egg=pyaux"`


Contains:

* **window**: iterator over a 'window' of N adjacent elements
* **dotdict**: attr→item dict subclass (e.g. for `d.key` instead of
  `d['key']`)
* **DebugPlug**: recursive duck-object for debug and testing
  purposes
* **repr_call**: convenient syntactically-appropriate representation of
  call arguments (also used in DebugPlug)
* **fxrange**, **frange**, **dxrange**, **drange**: `xrange()` / `range()`
  equivalents for float (without error accumulation) and Decimal
* **dict_fget**, **dict_fsetdefault**: versions of `dict.get` and
  `dict.setdefault` with lazy-computation of the default value
* **split_list**: simple one-pass splitting of list into two by a condition
* **use_cdecimal**: forced instance-wide use (by monkey-hack) of `cdecimal`
  instead of `decimal` (for performance)
* **use_exc_ipdb**: set unhandled exception handler to run `ipdb.pm()`
* **use_exc_log**: set unhandled exception handler to log (by `logging`) the
  exception and the stack trace including (when possible) the local
  variables.
* **use_colorer**: monkey-patch `logging` for colored logging
* **obj2dict**: recursive converter of tree-structure of classes into a
  tree-structure of dicts, e.g. for pretty-printing the result
* **mk_logging_property**: make a property that debug-logs the value and
  caller info when set
* Some other things that are too minor to be listed here.

Also, in separate submodules:

* **psql**: helpers for saving Django ORM objects into an SQL 'COPY'-like
  file and loading it in one SQL command (for high-performance loading of
  large amounts of data into the database)
* **lzmah**: lzma compress (as function and as an executable file); also
  provides a function `unjsllzma` to stream-read (json) lines from a
  pylzma-compressed file
* **lzcat**: lzcat for pylzma-specific format (as function and as an
  executale file)
* **runlib**: various things for runscripts:

  * **init_logging**: logging.basicConfig with useful defaults (for
    development runscripts).
  * **sigeventer**: list-based signal handler for SIGINT and SIGTERM (for
    appending handler functions, similarly to `atexit`)

