Releases: piccolo-orm/piccolo_api
0.42.0
Added dependency injection to PiccoloCRUD
hooks - the Starlette request object will now be passed in if requested. For example:
def my_hook(row_id, request):
...
Thanks to @AnthonyArmour and @destos for this.
0.41.0
0.40.0
0.39.0
Improved the HTTP status codes returned by the change_password
, register
and session_login
endpoints. They now return a 422 status code if a validation error occurs. This is required by Piccolo Admin, to better determine why a request failed.
0.38.0
Added read_only
option to change_password
and register
endpoints.
This is for Piccolo Admin's read_only
mode.
0.37.2
Changed a parameter name used in the change_password
endpoint to be less ambiguous (old_password
-> current_password
).
0.37.1
Changed a parameter name used in the change_password
endpoint to be less ambiguous (confirm_password
-> confirm_new_password
).
0.37.0
0.36.0
The session_login
, session_logout
, and register
endpoints can now have their CSS styles easily customised, to make them match the rest of the application.
from fastapi import FastAPI
from piccolo_api.session_auth.endpoints import register
from piccolo_api.shared.auth.styles import Styles
app = FastAPI()
app.mount(
'/register/',
register(
styles=Styles(background_color='black')
)
)
0.35.0
It is now trivially easy to add CAPTCHA support to the register
and session_login
endpoints, to provide protection against bots. Just sign up for an account with hCaptcha or reCAPTCHA, and do the following:
from fastapi import FastAPI
from piccolo_api.session_auth.endpoints import register
from piccolo_api.shared.auth.captcha import hcaptcha
app = FastAPI()
# To use hCaptcha:
app.mount(
'/register/',
register(
captcha=hcaptcha(
site_key='my-site-key',
secret_key='my-secret-key',
)
)
)