Piccolo-api

Latest version: v1.4.0

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

Scan your dependencies

Page 9 of 21

0.29.0

------

Added a ``__visible_fields`` filter to ``PiccoloCRUD``. It's a very powerful
feature which lets us specify which fields we want the API to return from a
GET request (courtesy sinisaos).

It can even support joins, but we must supply a ``max_joins`` parameter:

.. code-block:: python

app = PiccoloCRUD(Movie, max_joins=1)
uvicorn(app)

Then we can do:

.. code-block:: text

GET /?__visible_fields=id,name,director.name

Which will return:

.. code-block:: javascript

{
"rows": [
{
"id": 17,
"name": "The Hobbit: The Battle of the Five Armies",
"director": {
"name": "Peter Jackson"
}
},
...
]
}

By specifying exactly which data we want returned, it is much more efficient,
especially when fetching large numbers of rows, or with tables with lots of
columns.

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

0.28.1

------

Fixed a bug with the delete endpoint of ``PiccoloCRUD``. It was returning a 204
response with a body (this isn't allowed, and could cause an exception to be
raised in the web server). Thanks to trondhindenes for reporting this issue.

Updated Swagger UI to the latest version.

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

0.28.0

------

Modified the ``get_ids`` endpoint of ``PiccoloCRUD``, so it accepts an
``offset`` query parameter. It already supported ``limit``.

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

0.27.0

------

You can now pass a ``schema_extra`` argument to ``PiccoloCRUD``, which is
added to the underlying Pydantic schema.

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

0.26.0

------

``create_pydantic_model`` is now imported from the main Piccolo repo.

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

0.25.1

------

* Added examples to CSRF docs (courtesy sinisaos).
* Improved ``SessionAuthBackend`` - it was too aggressive at rejecting
requests when ``allow_unauthenticated=True`` (thanks to Bakz for reporting
this).

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

Page 9 of 21

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.