Piccolo-api

Latest version: v1.5.2

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

Scan your dependencies

Page 8 of 21

0.33.0

------

The schema endpoint of ``PiccoloCRUD`` now returns the primary key name. This
means we'll be able to support tables with a custom primary key name in Piccolo
Admin.

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

0.32.3

------

Make sure tables with a custom primary key column work with ``PiccoloCRUD``.

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

0.32.2

------

Fixed a bug with ``PiccoloCRUD``, where a PATCH request returned a string
instead of a JSON object. Thanks to trondhindenes for discovering and fixing
this issue.

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

0.32.1

------

Fixed bug with ``__range_header=false``.

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

0.32.0

------

Added support for the ``Content-Range`` HTTP header in the GET endpoint of
``PiccoloCRUD``. This means the API client can fetch the number of available
rows, without doing a separate API call to the ``count`` endpoint.

.. code-block::

GET /?__range_header=true

If the page size is 10, then the response header then looks something like:

.. code-block::

Content-Range: movie 0-9/100

The feature was created to make Piccolo APIs work better with front ends like
`React Admin <https://marmelab.com/react-admin/>`_.

Thanks to trondhindenes for adding this feature, and sinisaos for help
reviewing.

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

0.31.0

------

Added hooks to ``PiccoloCRUD``. This allows the user to add their own logic
before a save / patch / delete (courtesy trondhindenes).

For example:

.. code-block:: python

Normal functions and async functions are supported:
def pre_save_hook(movie):
movie.rating = 90
return movie

PiccoloCRUD(
table=Movie,
read_only=False,
hooks=[
Hook(hook_type=HookType.pre_save, callable=pre_save_hook)
]
)

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

Page 8 of 21

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.