Piccolo

Latest version: v1.22.0

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

Scan your dependencies

Page 3 of 53

1.13.0

------

Improved ``LazyTableReference``, to help prevent circular import errors.

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

1.12.0

------

* Added documentation for one to one fields.
* Upgraded ASGI templates (thanks to sinisaos for this).
* Migrations can now be hardcoded as fake.
* Refactored tests to reduce boilerplate code.
* Updated documentation dependencies.

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

1.11.0

------

Added datetime functions, for example ``Year``:

.. code-block:: python

>>> from piccolo.query.functions import Year
>>> await Concert.select(Year(Concert.starts, alias="starts_year"))
[{'starts_year': 2024}]

Added the ``Concat`` function, for concatenating strings:

.. code-block:: python

>>> from piccolo.query.functions import Concat
>>> await Band.select(
... Concat(
... Band.name,
... '-',
... Band.manager._.name,
... alias="name_and_manager"
... )
... )
[{"name_and_manager": "Pythonistas-Guido"}]

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

1.10.0

------

Added ``not_any`` method for ``Array`` columns. This will return rows where an
array doesn't contain the given value. For example:

.. code-block:: python

class MyTable(Table):
array_column = Array(Integer())

>>> await MyTable.select(
... MyTable.array_column
... ).where(
... MyTable.array_column.not_any(1)
... )
[{"array_column": [4, 5, 6]}]

Also fixed a bunch of Pylance linter warnings across the codebase.

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

1.9.0

-----

Added some math functions, for example ``Abs``, ``Ceil``, ``Floor`` and
``Round``.

.. code-block:: python

>>> from piccolo.query.functions import Round
>>> await Ticket.select(Round(Ticket.price, alias="price"))
[{'price': 50.0}]

Added more operators to ``QueryString`` (multiply, divide, modulus, power), so
we can do things like:

.. code-block:: python

>>> await Ticket.select(Round(Ticket.price) * 2)
[{'price': 100.0}]

Fixed some edge cases around defaults for ``Array`` columns.

.. code-block:: python

def get_default():
This used to fail:
return [datetime.time(hour=8, minute=0)]

class MyTable(Table):
times = Array(Time(), default=get_default)

Fixed some deprecation warnings, and improved CockroachDB array tests.

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

1.8.2

-----

Added a missing JPEG file for an example form.

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

Page 3 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.