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 3 of 21

1.0a1

-----

Pydantic v2 support - many thanks to sinisaos for this.

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

0.58.0

------

Upgraded the version of Swagger UI used in the ``swagger_ui`` endpoint (see
``piccolo_api.openapi.endpoints.swagger_ui``). Thanks to sinisaos for this.

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

0.57.0

------

``PiccoloCRUD`` now handles foreign key violation errors gracefully.

For example, if we have tables like this:

.. code-block:: python

class Director(Table):
name = Varchar()

class Movie(Table):
name = Varchar()
director = ForeignKey(Director, on_delete=OnDelete.restrict)

The ``ON DELETE RESTRICT`` constraint means we're not allowed to delete a
director if a movie has a foreign key to it.

We now get a ``422`` error response, with an error message which we can display
in Piccolo Admin.

Support for Python 3.7 has also been dropped, as it's end of life.

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

0.56.0

------

Version pinning Pydantic to v1, as v2 has breaking changes.

We will add support for Pydantic v2 in a future release.

Thanks to sinisaos for helping with this.

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

0.55.0

------

Added the ``excluded_paths`` argument to ``TokenAuthBackend``. This means you
can wrap an entire ASGI application in this middleware, and exclude certain
paths, such as the Swagger docs. Thanks to sinisaos for this.

.. code-block:: python

app = FastAPI(
dependencies=[Depends(APIKeyHeader(name="Authorization"))],
middleware=[
Middleware(
AuthenticationMiddleware,
backend=TokenAuthBackend(
SecretTokenAuthProvider(tokens=["abc123"]),
excluded_paths=["/docs", "/openapi.json"], <- Note
),
)
],
)

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

0.54.0

------

Added ``allow_unauthenticated`` option to ``JWTMiddleware``.

By default, ``JWTMiddleware`` rejects any request with an invalid JWT token,
but with this option we allow the user to reject the request instead within
their endpoints.

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

Page 3 of 21

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.