This functionality is possible , its documented here https://docs.sqlalchemy.org/en/14/core/defaults.html#context-sensitive-default-functions
You are supposed to use the context object but it seems happy to accept values thrown back at it