Skip to content

Releases: piccolo-orm/piccolo_api

0.29.2

09 Dec 10:41
Compare
Choose a tag to compare

Fixed a bug with the OpenAPI docs when using Array columns. Thanks to @gmos for reporting this issue, and @sinisaos for fixing it.

You now get a nice UI for Array columns:

145380504-cd9fa853-45c7-475b-a1a5-2f1521e7b252

0.29.1

04 Dec 08:40
Compare
Choose a tag to compare

The __visible_fields filter on PiccoloCRUD now works on the detail endpoint (courtesy @sinisaos). For example:

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

We also modified a type annotation in FastAPIWrapper, so you can use it with FastAPI's APIRouter without getting a type warning. Thanks to @gmos for reporting this issue.

0.29.0

16 Nov 07:08
Compare
Choose a tag to compare

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:

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

Then we can do:

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

Which will return:

  {
    "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

11 Nov 17:39
Compare
Choose a tag to compare

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

31 Oct 17:34
Compare
Choose a tag to compare

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

0.27.0

24 Oct 20:24
Compare
Choose a tag to compare

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

This is mostly to support new Piccolo Admin features.

0.26.0

24 Sep 13:17
Compare
Choose a tag to compare

create_pydantic_model is now imported from the main Piccolo repo.

0.25.1

19 Sep 15:34
Compare
Choose a tag to compare
  • 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).

0.25.0

07 Sep 15:26
Compare
Choose a tag to compare

If you send a GET request to the session_logout endpoint, it will now render a simple logout form. This makes it work much nicer out of the box. Thanks to @sinisaos for adding this.

0.24.1

01 Sep 18:21
Compare
Choose a tag to compare

When using the nested argument in create_pydantic_model, more of the other arguments are passed to the nested models. For example, if include_default_columns is True, both the parent and child models will include their default columns.