Piccolo

Latest version: v1.22.0

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

Scan your dependencies

Page 25 of 53

0.49.0

Not secure
------
Fixed a bug with ``create_pydantic_model`` when used with a ``Decimal`` /
``Numeric`` column when no ``digits`` arguments was set (courtesy AliSayyah).

Added the ``create_tables`` function, which accepts a sequence of ``Table``
subclasses, then sorts them based on their ``ForeignKey`` columns, and creates
them. This is really useful for people who aren't using migrations (for
example, when using Piccolo in a simple data science script). Courtesy
AliSayyah.

.. code-block:: python

from piccolo.tables import create_tables

create_tables(Band, Manager, if_not_exists=True)

Equivalent to:
Manager.create_table(if_not_exists=True).run_sync()
Band.create_table(if_not_exists=True).run_sync()

Fixed typos with the new fixtures app - sometimes it was referred to as
``fixture`` and other times ``fixtures``. It's now standardised as
``fixtures`` (courtesy hipertracker).

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

0.48.0

Not secure
------
The ``piccolo user create`` command can now be used by passing in command line
arguments, instead of using the interactive prompt (courtesy AliSayyah).

For example ``piccolo user create --username=bob ...``.

This is useful when you want to create users in a script.

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

0.47.0

Not secure
------
You can now use ``pip install piccolo[all]``, which will install all optional
requirements.

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

0.46.0

Not secure
------
Added the fixtures app. This is used to dump data from a database to a JSON
file, and then reload it again. It's useful for seeding a database with
essential data, whether that's a colleague setting up their local environment,
or deploying to production.

To create a fixture:

.. code-block:: bash

piccolo fixtures dump --apps=blog > fixture.json

To load a fixture:

.. code-block:: bash

piccolo fixtures load fixture.json

As part of this change, Piccolo's Pydantic support was brought into this
library (prior to this it only existed within the ``piccolo_api`` library). At
a later date, the ``piccolo_api`` library will be updated, so it's Pydantic
code just proxies to what's within the main ``piccolo`` library.

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

0.45.2

------

Nullable UUID fields now work correctly.

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

0.45.1

Not secure
------
Improvements to ``piccolo schema generate``. It's now smarter about which
imports to include. Also, the ``Table`` classes output will now be sorted based
on their ``ForeignKey`` columns. Internally the sorting algorithm has been
changed to use the ``graphlib`` module, which was added in Python 3.9.

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

Page 25 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.