Piccolo

Latest version: v1.12.0

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

Scan your dependencies

Page 19 of 50

0.62.2

Not secure
------

Added a max password length to the ``BaseUser`` table. By default it's set to
128 characters.

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

0.62.1

Not secure
------

Fixed a bug with ``Readable`` when it contains lots of joins.

``Readable`` is used to create a user friendly representation of a row in
Piccolo Admin.

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

0.62.0

Not secure
------

Added Many-To-Many support.

.. code-block:: python

from piccolo.columns.column_types import (
ForeignKey,
LazyTableReference,
Varchar
)
from piccolo.columns.m2m import M2M


class Band(Table):
name = Varchar()
genres = M2M(LazyTableReference("GenreToBand", module_path=__name__))


class Genre(Table):
name = Varchar()
bands = M2M(LazyTableReference("GenreToBand", module_path=__name__))


This is our joining table:
class GenreToBand(Table):
band = ForeignKey(Band)
genre = ForeignKey(Genre)


>>> await Band.select(Band.name, Band.genres(Genre.name, as_list=True))
[
{
"name": "Pythonistas",
"genres": ["Rock", "Folk"]
},
...
]

See the docs for more details.

Many thanks to sinisaos and yezz123 for all the input.

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

0.61.2

Not secure
------

Fixed some edge cases where migrations would fail if a column name clashed with
a reserved Postgres keyword (for example ``order`` or ``select``).

We now have more robust tests for ``piccolo asgi new`` - as part of our CI we
actually run the generated ASGI app to make sure it works (thanks to AliSayyah
and yezz123 for their help with this).

We also improved docstrings across the project.

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

0.61.1

Not secure
------

Nicer ASGI template
~~~~~~~~~~~~~~~~~~~

When using ``piccolo asgi new`` to generate a web app, it now has a nicer home
page template, with improved styles.

Improved schema generation
~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixed a bug with ``piccolo schema generate`` where it would crash if the column
type was unrecognised, due to failing to parse the column's default value.
Thanks to gmos for reporting this issue, and figuring out the fix.

Fix Pylance error
~~~~~~~~~~~~~~~~~

Added ``start_connection_pool`` and ``close_connection_pool`` methods to the
base ``Engine`` class (courtesy gmos).

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

0.61.0

Not secure
------

The ``save`` method now supports a ``columns`` argument, so when updating a
row you can specify which values to sync back. For example:

.. code-block:: python

band = await Band.objects().get(Band.name == "Pythonistas")
band.name = "Super Pythonistas"
await band.save([Band.name])

Alternatively, strings are also supported:
await band.save(['name'])

Thanks to trondhindenes for suggesting this feature.

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

Page 19 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.