Piccolo

Latest version: v1.12.0

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

Scan your dependencies

Page 11 of 50

0.91.0

Not secure
------

Added support for Starlite. If you use ``piccolo asgi new`` you'll see it as
an option for a router.

Thanks to sinisaos for adding this, and peterschutt for helping debug ASGI
mounting.

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

0.90.0

Not secure
------

Fixed an edge case, where a migration could fail if:

* 5 or more tables were being created at once.
* They all contained foreign keys to each other, as shown below.

.. code-block:: python

class TableA(Table):
pass

class TableB(Table):
fk = ForeignKey(TableA)

class TableC(Table):
fk = ForeignKey(TableB)

class TableD(Table):
fk = ForeignKey(TableC)

class TableE(Table):
fk = ForeignKey(TableD)


Thanks to sumitsharansatsangi for reporting this issue.

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

0.89.0

Not secure
------

Made it easier to access the ``Email`` columns on a table.

.. code-block:: python

>>> MyTable._meta.email_columns
[MyTable.email_column_1, MyTable.email_column_2]

This was added for Piccolo Admin.

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

0.88.0

Not secure
------

Fixed a bug with migrations - when using ``db_column_name`` it wasn't being
used in some alter statements. Thanks to theelderbeever for reporting this
issue.

.. code-block:: python

class Concert(Table):
We use `db_column_name` when the column name is problematic - e.g. if
it clashes with a Python keyword.
in_ = Varchar(db_column_name='in')

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

0.87.0

Not secure
------

When using ``get_or_create`` with ``prefetch`` the behaviour was inconsistent -
it worked as expected when the row already existed, but prefetch wasn't working
if the row was being created. This now works as expected:

.. code-block:: python

>>> band = Band.objects(Band.manager).get_or_create(
... (Band.name == "New Band 2") & (Band.manager == 1)
... )

>>> band.manager
<Manager: 1>
>>> band.manager.name
"Mr Manager"

Thanks to backwardspy for reporting this issue.

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

0.86.0

Not secure
------

Added the ``Email`` column type. It's basically identical to ``Varchar``,
except that when we use ``create_pydantic_model`` we add email validation
to the generated Pydantic model.

.. code-block:: python

from piccolo.columns.column_types import Email
from piccolo.table import Table
from piccolo.utils.pydantic import create_pydantic_model


class MyTable(Table):
email = Email()


model = create_pydantic_model(MyTable)

model(email="not a valid email")
ValidationError!

Thanks to sinisaos for implementing this feature.

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

Page 11 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.