Skip to content

v0.13.0

Compare
Choose a tag to compare
@RobertCraigie RobertCraigie released this 22 Mar 10:20
· 60 commits to main since this release
ce76a92

What's changed

Customisation of client model instance names

Up until now, if you had a schema like this defined:

model OrgMember {
  // ...
}

You would have to access it like this:

from prisma import Prisma

client = Prisma()
member = client.orgmember.find_unique(...)

With this release you can customise the instance name on the client, e.g. orgmember, to whatever you would like! For example:

/// @Python(instance_name: "org_member")
model OrgMember {
  // ...
}

The OrgMember model can now be accessed through the client like so:

client = Prisma()
client.org_member.find_unique(...)

A future release will also add support for changing the default casing implementation used in the client!

Prisma upgrades

The internal Prisma version has been bumped from 5.8.0 to 5.11.0, you can find the release notes for each version below:

Official support for Python 3.12

Up until now Prisma Client Python didn't declare support for Python 3.12 but it will have worked at runtime. The only user facing changes in this release are to the python -m prisma_cleanup script to avoid a deprecation warning.

Minor internal breaking changes

Some minor changes were made to modules that were intended to be private but were not marked with a preceding _.

  • prisma.builder has been moved to prisma._builder
  • The main export from the prisma.builder module, QueryBuilder, has new required constructor arguments

Misc changes

I've also started laying the ground work for usage of both the async client and the sync client at the same time and hope to support this in the next release!

New Contributors

Sponsors

sponsors