Get cytoolz or toolz, whatever's around
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file zbox-1.2.0.zip
.
File metadata
- Download URL: zbox-1.2.0.zip
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4e64e623015ea2cde4e7df688d77c2c5a899f55a2ed40f60aaace50914c83d9 |
|
MD5 | cf9fd4875fc780824950818394eaf77c |
|
BLAKE2b-256 | 8e9c0ca5689a6bfd3ffd8be7eb1282a39e9d7f916fdb96bf3cb6cea03049dbd8 |
File details
Details for the file zbox-1.2.0.tar.gz
.
File metadata
- Download URL: zbox-1.2.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d58fb949fae5796062935222ea5695bdcec5c3c4f45c06aa0154e7ca6921e0d9 |
|
MD5 | faa2f3104736e00c5c937da5835b3391 |
|
BLAKE2b-256 | 909ba29ea42a6a4f7ebcc7dbaf46eff78c9bf2f3b9569779b0a93c46a2cb3915 |
File details
Details for the file zbox-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: zbox-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 144ded5d88b67635e5aa636f4ac9f7360a390b5538ebcb86a46ca13beaff2953 |
|
MD5 | 18d0d367f3b9143f3ae2d470ede2825a |
|
BLAKE2b-256 | 3a2166d167ebe9f0058b1efb487844f5d34e968a3d48ca3b5eac707769863c8a |