Skip to content

v0.6.2

Compare
Choose a tag to compare
@RobertCraigie RobertCraigie released this 05 Mar 16:15
· 414 commits to main since this release
1b320ba

Bug Fixes

In v0.6.0 we renamed Prisma to Client, in doing so we accidentally removed the export for the previous Client name which was kept for backwards compatibility. This release re-exports it so the following code will no longer raise an error:

from prisma import Client

What's Changed

Support for filtering by in and not_in for Bytes fields

For example the following query will find the first record where binary_data is either my binary data or my other binary data.

from prisma import Base64
from prisma.models import Data

await Data.prisma().find_first(
    where={
        'binary_data': {
            'in': [
                Base64.encode(b'my binary data'),
                Base64.encode(b'my other binary data'),
            ],
        },
    },
)

And if you want to find a record that doesn't match any of the arguments you can use not_in

from prisma import Base64
from prisma.models import Data

await Data.prisma().find_first(
    where={
        'binary_data': {
            'not_in': [
                Base64.encode(b'my binary data'),
                Base64.encode(b'my other binary data'),
            ],
        },
    },
)

Added __slots__ definitions

All applicable classes now define the __slots__ attribute for improved performance and memory usage, for more information on what this means, see the Python documentation.

New Contributors

Thank you to @matyasrichter 💜