Piccolo

Latest version: v1.12.0

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

Scan your dependencies

Page 20 of 50

0.60.2

Not secure
------

Fixed a bug with ``asyncio.gather`` not working with some query types. It was
due to them being dataclasses, and they couldn't be hashed properly. Thanks to
brnosouza for reporting this issue.

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

0.60.1

Not secure
------

Modified the import path for ``MigrationManager`` in migration files. It was
confusing Pylance (VSCode's type checker). Thanks to gmos for reporting and
investigating this issue.

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

0.60.0

Not secure
------

Secret columns
~~~~~~~~~~~~~~

All column types can now be secret, rather than being limited to the
``Secret`` column type which is a ``Varchar`` under the hood (courtesy
sinisaos).

.. code-block:: python

class Manager(Table):
name = Varchar()
net_worth = Integer(secret=True)

The reason this is useful is you can do queries such as:

.. code-block:: python

>>> Manager.select(exclude_secrets=True).run_sync()
[{'id': 1, 'name': 'Guido'}]

In the Piccolo API project we have ``PiccoloCRUD`` which is an incredibly
powerful way of building an API with very little code. ``PiccoloCRUD`` has an
``exclude_secrets`` option which lets you safely expose your data without
leaking sensitive information.

Pydantic improvements
~~~~~~~~~~~~~~~~~~~~~

max_recursion_depth
*******************

``create_pydantic_model`` now has a ``max_recursion_depth`` argument, which is
useful when using ``nested=True`` on large database schemas.

.. code-block:: python

>>> create_pydantic_model(MyTable, nested=True, max_recursion_depth=3)

Nested tuple
************

You can now pass a tuple of columns as the argument to ``nested``:

.. code-block:: python

>>> create_pydantic_model(Band, nested=(Band.manager,))

This gives you more control than just using ``nested=True``.

include_columns / exclude_columns
*********************************

You can now include / exclude columns from related tables. For example:

.. code-block:: python

>>> create_pydantic_model(Band, nested=(Band.manager,), exclude_columns=(Band.manager.country))

Similarly:

.. code-block:: python

>>> create_pydantic_model(Band, nested=(Band.manager,), include_columns=(Band.name, Band.manager.name))

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

0.59.0

Not secure
------

* When using ``piccolo asgi new`` to generate a FastAPI app, the generated code
is now cleaner. It also contains a ``conftest.py`` file, which encourages
people to use ``piccolo tester run`` rather than using ``pytest`` directly.
* Tidied up docs, and added logo.
* Clarified the use of the ``PICCOLO_CONF`` environment variable in the docs
(courtesy theelderbeever).
* ``create_pydantic_model`` now accepts an ``include_columns`` argument, in
case you only want a few columns in your model, it's faster than using
``exclude_columns`` (courtesy sinisaos).
* Updated linters, and fixed new errors.

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

0.58.0

Not secure
------

The default rate limiting is now more aggressive. This can be overridden using
the ``rate_limit_provider`` argument of ``create_admin``.

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

0.57.0

Not secure
------

Improved the handling of nullable ``Varchar`` / ``Text`` columns in the UI.

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

Page 20 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.