UDST / zbox

Get cytoolz or toolz, whatever's around

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zbox

Latest Version Supported Python versions Wheel Status Travis-CI Status

zbox is a tiny library to help me use toolz and cytoolz. I frequently use toolz and would like to use cytoolz if it's available, but don't want to put a try/except in all my projects. By importing toolz from zbox I always get cytoolz if cytoolz is installed and otherwise I get toolz.

Installation

zbox is on PyPI, install it with: pip install zbox. zbox works on Python 2 and Python 3.

Usage

from zbox import toolz

If cytoolz is installed toolz will be cytoolz, otherwise it will be toolz.

gen

from zbox import gen

gen is a function that converts any iterable into a Python generator object. I use this with Pandas, which sometimes doesn't expand iterables unless they are first converted to a generator.

About

Get cytoolz or toolz, whatever's around

License:ISC License


Languages

Language:Python 96.7%Language:Batchfile 1.7%Language:Shell 1.6%