Convtools

Latest version: v1.14.4

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

Scan your dependencies

Page 14 of 19

0.13.0

**Features**

[convtools-ita 28 ](https://github.com/itechart/convtools/issues/28)

- now ``c.iter`` supports ``where`` parameters just like ``c.generator_comp``:

* ``c.iter(c.this() + 1, where=c.this() > 0)``

- now it's possible to use ``.pipe`` wherever you want as long as it lets you
do so, even piping in and out of reducers (``c.ReduceFuncs``)

* e.g. it will raise an Exception if you try to add labels to a reducer input

- now it's possible to use ``aggregate`` inside ``aggregate`` as long as you
don't nest reducers

0.12.1

**Bugfix**

- fixed sporadic issues caused by code substring replacements (now it uses word
replacements)

0.12.0

**Bugfix - BREAKING CHANGES**

- ``.filter`` was unified across the library to work with previous step results
only, no longer injecting conditions inside comprehensions & reducers.
So to pass conditions to comprehensions & reducers, use the following:

python
REPLACE THIS
c.ReduceFuncs.Array(c.item("a")).filter(c.item("b") == "bar")
WITH THAT
c.ReduceFuncs.Array(c.item("a"), where=c.item("b") == "bar")
if the condition is to be applied before the aggregation
or leave as is if you want to filter the resulting array


- ``c.generator_comp(...).filter(condition)`` no longer pushes condition inside
the comprehension, the filtering works on resulting generator
The same applies to:

* ``c.list_comp``
* ``c.tuple_comp``
* ``c.set_comp``
* ``c.dict_comp``

python
REPLACE THIS
c.generator_comp(c.item("a")).filter(c.item("b") == "bar")
WITH THAT
c.generator_comp(c.item("a"), where=c.item("b") == "bar")
if the condition is to be put to the IF clause of the comprehension to
work with the input elements or leave it as is if you want to filter the
resulting generator

0.11.2

**Features**

- introduced ``c.sort`` & ``(...).sort`` conversions, which are helpers for
``sorted``; this is done for the sake of unification with methods of
comprehension conversions

**Misc**

- implemented ``GroupBy.filter``, which returns generator of results without
creating an intermediate list

0.11.1

**Bugfix**

- fixed complex conversion cases where there are multiple aggregations
[convtools-ita 27 ](https://github.com/itechart/convtools/issues/27)

0.11.0

**Features**

[convtools-ita 26 ](https://github.com/itechart/convtools/issues/26)

- reimplemented pipes as a separate conversion + smart inlining
- now pipes are the only conversions which take care of adding labels
- introduced ``c.iter``: shortcut for ``self.pipe(c.generator_comp(element_conv))``
- introduced ``c.iter_mut``: generates the code which iterates and mutates the
elements in-place. The result is a generator.

**Bugfix**

- fixed ``GroupBy.filter`` method to return generator by default, instead of
list

Page 14 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.