Agate

Latest version: v1.12.0

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

Scan your dependencies

Page 1 of 7

1.12.0

----------------------

- feat: :class:`.Number` accepts a ``no_leading_zeroes`` keyword argument, to indicate whether to disallow numbers with leading zeroes (not including a single zero, or a single zero before a decimal).

1.11.0

---------------------

- fix: The `key` argument to :meth:`.Table.to_json` errors if two values are equal, even if their CSV representation is different: for example, "1/1/2020" and "01/01/2020". However, until now, this was not the case for numbers: for example, "3.0" was treated as unequal to "3.00".

1.10.2

-----------------------

- fix: Version 1.10.0 errors on piped data.

1.10.1

-----------------------

- fix: Version 1.10.0 errors on empty tables and seeks to the file's beginning, instead of to the original offset.
- fix: :meth:`.Number.csvify` returns a ``Decimal`` (or ``None``), instead of ``str``. :meth:`.Table.to_csv` with ``quoting=csv.QUOTE_NONNUMERIC`` now works.

1.10.0

-----------------------

- feat: :meth:`.Table.from_csv` reads the file line by line. If ``column_types`` is a :class:`.TypeTester`, it reads the file into memory. (778)
- fix: Fix :meth:`.TableSet.print_structure` for nested tablesets. (765)

.. code-block:: python

import agate
mytable = agate.Table([
('foo', 'FOO', 1),
('foo', 'FOO', 2),
('bar', 'BOZ', 1),
('bar', 'BAZ', 2),
('bar', 'BIZ'),
])

Instead of:

.. code-block:: none

>>> mytable.group_by('a').group_by('b')
AttributeError: 'TableSet' object has no attribute 'rows'

Now:

.. code-block:: none

>>> mytable.group_by('a').group_by('b')
| table | rows |
| ------- | ---- |
| foo.FOO | 2 |
| bar.BOZ | 1 |
| bar.BAZ | 1 |
| bar.BIZ | 1 |

1.9.1

-------------------------

* Add Babel 2.14 support.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.