Piccolo

Latest version: v1.22.0

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

Scan your dependencies

Page 15 of 53

0.84.0

Not secure
------

You can now preview the DDL statements which will be run by Piccolo migrations.

.. code-block:: bash

piccolo migrations forwards my_app --preview

Thanks to AliSayyah for adding this feature.

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

0.83.0

Not secure
------

We added support for Postgres read-slaves a few releases ago, but the ``batch``
clause didn't support it until now. Thanks to guruvignesh01 for reporting
this issue, and sinisaos for help implementing it.

.. code-block:: python

Returns 100 rows at a time from read_replica_db
async with await Manager.select().batch(
batch_size=100,
node="read_replica_db",
) as batch:
async for _batch in batch:
print(_batch)


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

0.82.0

Not secure
------

Traditionally, when instantiating a ``Table``, you passed in column values
using kwargs:

.. code-block:: python

>>> await Manager(name='Guido').save()

You can now pass in a dictionary instead, which makes it easier for static
typing analysis tools like Mypy to detect typos.

.. code-block:: python

>>> await Manager({Manager.name: 'Guido'}).save()

See `PR 565 <https://github.com/piccolo-orm/piccolo/pull/565>`_ for more info.

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

0.81.0

Not secure
------

Added the ``returning`` clause to ``insert`` and ``update`` queries.

This can be used to retrieve data from the inserted / modified rows.

Here's an example, where we update the unpopular bands, and retrieve their
names, in a single query:

.. code-block:: python

>>> await Band.update({
... Band.popularity: Band.popularity + 5
... }).where(
... Band.popularity < 10
... ).returning(
... Band.name
... )
[{'name': 'Bad sound band'}, {'name': 'Tone deaf band'}]

See `PR 564 <https://github.com/piccolo-orm/piccolo/pull/564>`_ and
`PR 563 <https://github.com/piccolo-orm/piccolo/pull/563>`_ for more info.

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

0.80.2

Not secure
------

Fixed a bug with ``Combination.__str__``, which meant that when printing out a
query for debugging purposes it was wasn't showing correctly (courtesy
destos).

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

0.80.1

Not secure
------

Fixed a bug with Piccolo Admin and ``_get_related_readable``, which is used
to show a human friendly identifier for a row, rather than just the ID.

Thanks to ethagnawl and sinisaos for their help with this.

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

Page 15 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.