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

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.

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

0.53.0

------

Added ``token_login`` endpoint, which is more convenient than
``TokenAuthLoginEndpoint``.

Improved the docs for token auth and JWT auth (thanks to sinisaos).

Modified the ``OrderBy`` class, to add some functionality needed by Piccolo
Admin.

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

0.52.0

------

``PiccoloCRUD`` now lets you specify multiple columns in the ``__order`` GET
param.

For example, with this schema:

.. code-block:: python

class Movie(Table):
name = Varchar()
rating = Integer()

To order the results by descending ``rating`` and ascending ``name``:

.. code-block::

GET /?__order=-rating,name

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

0.51.0

------

You can now get all rows with a null / not-null value in ``PiccoloCRUD``.

For example, if we have a nullable column called ``score``:

.. code-block::

GET /?score__operator=is_null

Likewise, to get all rows whose score is not null:

.. code-block::

GET /?score__operator=not_null

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

0.50.0

------

Catching more database errors in ``PiccoloCRUD``, and returning useful API
responses instead of 500 errors.

Implemented GitHub's CodeQL suggestions - this now means ``LocalMediaStorage``
uses ``600`` instead of ``640`` as the default file permissions for uploaded
files (thanks to sinisaos for this).

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

Page 3 of 21

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.