Piccolo

Latest version: v1.5.0

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

Scan your dependencies

Page 11 of 48

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.

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

0.80.0

Not secure
------

There was a bug when doing joins with a ``JSONB`` column with ``as_alias``.

.. code-block:: python

class User(Table, tablename="my_user"):
name = Varchar(length=120)
config = JSONB(default={})


class Subscriber(Table, tablename="subscriber"):
name = Varchar(length=120)
user = ForeignKey(references=User)


async def main():
This was failing:
await Subscriber.select(
Subscriber.name,
Subscriber.user.config.as_alias("config")
)

Thanks to Anton-Karpenko for reporting this issue.

Even though this is a bug fix, the minor version number has been bumped because
the fix resulted in some refactoring of Piccolo's internals, so is a fairly big
change.

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

0.79.0

Not secure
------

Added a custom ``__repr__`` method to ``Table``'s metaclass. It's needed to
improve the appearance of our Sphinx docs. See
`issue 549 <https://github.com/piccolo-orm/piccolo/issues/549>`_ for more
details.

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

Page 11 of 48

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.