Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

pyaux

Project Description

Collection of helpers and useful things for Python

pyaux

Personal collection of helpers and often-useful snippets for Python

Install the latest version with pip install -U -e “git+https://github.com/HoverHell/pyaux.git#egg=pyaux”

Contains:

  • bubble: syntactic sugar for super(…)
  • window: iterator over a ‘window’ of N adjacent elements
  • SmartDict: 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
  • interp, edi: two versions (simplified and format-supporting) of convenient string interpolation (or simplified templating)
  • 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)
    • make_manhole: init a Twisted SSH manhole with set up locals, key-based auth, etc.
  • twisted_aux: use_exc_log-equivalent for twisted (and a helper to remove the default logger).
Release History

Release History

This version
History Node

2.0.0

History Node

1.15.0

History Node

1.14.0

History Node

1.13.0

History Node

1.12.0

History Node

1.11.0

History Node

1.10.0

History Node

1.9.0

History Node

1.8.0

History Node

1.7.2

History Node

1.7.1

History Node

1.7.0

History Node

1.6.0

History Node

1.5.0

History Node

1.3.2

History Node

1.3.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyaux-2.0.0.tar.gz (60.2 kB) Copy SHA256 Checksum SHA256 Source Oct 26, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting