Convtools

Latest version: v1.14.3

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 18

0.20.2

[14](https://github.com/westandskif/convtools/issues/14)

**Misc**

- improved performance of ``Table.chain``, ``Table.into_iter_rows`` and
``Table.into_csv`` methods
- improved performance of ``c.apply_func``

0.20.1

[11](https://github.com/westandskif/convtools/pull/11)

**Features**

- added ``c.chunk_by(c.item("x"), size=100)`` for slicing iterables into chunks
by element values and/or size of chunk
- added ``c.chunk_by_condition(c.CHUNK.item(-1) - c.this() < 100)`` for slicing
iterables into chunks based on condition, which is a function of a current
chunk and a current element
- added ``(...).len()`` shortcut for ``c.call_func(len, c.this())``

**Misc**

- no longer create empty ``labels_`` dict on each converter call where no
labels are going to be used
- no longer create new ``This`` instances, now reusing an existing one

0.19.0

**Clean-up**

Normally you use ``c.ReduceFuncs.Sum(c.this())`` to reduce something, but it's
possible to use custom reduce functions like this:

* ``c.reduce(lambda x, y: x + y, c.this(), initial=0)``
* ``c.reduce(c.inline_expr("{} + {}"), c.this(), initial=0)``

``c.reduce`` used to support ``prepare_first`` parameter which was adding
confusion. Now it's dropped.

0.18.0

**Features**

[6](https://github.com/westandskif/convtools/issues/6)

- added ``c.take_while`` and ``(...).take_while`` re-implementation of
``itertools.takewhile``
- added ``c.drop_while`` and ``(...).drop_while`` re-implementation of
``itertools.dropwhile``

0.17.0

**Features**

- added ``Table.zip`` method to stitch tables (joining on row indexes)
- added ``Table.chain`` method to put tables together one after another

0.16.0

**Features**

- introduced ``Table`` conversions [3](https://github.com/westandskif/convtools/pull/3)
- added ``c.apply_func``, ``c.apply`` and ``(...).apply_method`` conversions

**Bugfix**

- fixed inner join with inner loop with soft conditions: any condition except
for ``==`` and ``c.and_``
- fixed piping to callable with further calling pipe methods like ``as_type``,
``filter`` and ``sort``

**Misc**

- reworked main converter callable wrapper so that it no longer dumps sources
onto disk for beautiful stacktraces when the converter returns a generator
(it used to make them down almost 2 times slower). If such debugging is
needed, just enable debug. As for simple exceptions, these still dump code to
disc on Exceptions because this should be cheap.

Page 11 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.