v0.13.0
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 toprisma._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!
- fix(node): bump minimum node version to v16
- fix(generator): remove use of deprecated pydantic methods
- fix(types): remove definition of StrEnum as Enum
- fix(requirements): set minimum pydantic version to 1.10.0