Miscellaneous

Useful libraries or tools that don't fit in the categories above.

Some helpers aren't in the standard library, so before writing your own Python utility library, check boltons. Blinker dispatches signals between modules.

How to choose:

  • Helpers the standard library lacks, like atomic file saves and chunked iteration: boltons
  • Events inside one process, between modules that don't import each other: Blinker

Listed in editorial order. Click a column header to re-sort the whole list.

Press / to search. Tags open their category. Click a row for details.

Search and filter

Results

Row number Tags
A fast Python in-process signal/event dispatching system.
pallets-eco/github.com/pallets-eco/blinker /2,109 stars /
A set of pure-Python utilities.
mahmoud/github.com/mahmoud/boltons /6,940 stars /

Miscellaneous guide

boltons is a set of pure-Python utilities missing from the standard library, like atomic file saves and chunked iteration. Run pip install boltons, then import what you need from its modules, e.g. from boltons.cacheutils import LRU. It depends on no other packages and its modules are self-contained, so you can also copy the whole package into your project, or just one module. Most modules aim to be good enough for basic uses. When you outgrow one, its docs often point to a third-party alternative.

Blinker lets any number of interested parties subscribe to events, or signals, inside one Python process. Create a named signal with signal('name'): every call with that name returns the same object, so modules and plugins share it without importing each other. Register receivers with connect(), and when you call send(), pass the object that emits the signal, usually self. A receiver can then subscribe to one sender only.

Know a project that belongs here?

Tell us what it does and why it stands out.